Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: -joinby- doesn't recognize -using- dataset


From   Michael McCulloch <[email protected]>
To   [email protected]
Subject   Re: st: -joinby- doesn't recognize -using- dataset
Date   Sun, 25 Oct 2009 23:12:34 -0700

Problem solved, but reason unknown! Although the following two lines  
of code appear visually identical to you astute Statalist members,  
they are not functionally identical in my Stata10's do-file editor:

. joinby group using a.dta
. joinby group using a.dta

I discovered this accidentally when comparing the command I sent in my  
outbox:
. joinby group using a.dta

to what appears below as received from the Statalist server:
> . joinby group


and then manually retyped the line in the do-file editor, where it  
works splendidly.

Notice the missing "using a.dta"! Must be some display/format code  
lurking in the text. So now my question becomes: isn't the Stata do- 
file editor a text editor that doesn't copy display/format code with  
text copied and pasted from another application, such as a word  
processor?

Michael



On Oct 25, 2009, at 10:28 PM, Michael McCulloch wrote:

> Hello Statalist folks,
> I created the sample code below which successfully runs a -joinby-  
> operation on a test dataset.
> However, when I invoke the same -joinby- command:
> . joinby group
> using my live datasets, I am met with error message:
> . joinby group
> using required
> r(100);
>
> I have confirmed that directories and filenames are correctly  
> specified.
>
>
> clear
> set obs 3
> gen a = _n
> gen group="x"
> list
> save a, replace
> clear
> set obs 3
> gen b="a"
> replace b="b" in 2
> replace b="c" in 3
> gen group="x"
> list
> joinby group using a.dta
> sort a b
> list a b group
>
>
>
>
>
>
>
> Michael McCulloch
> Pine Street Foundation
> 124 Pine Street
> San Anselmo, CA 94960-2674
> tel:	415-407-1357
> fax: 	206-338-2391
> [email protected]
>
>
>
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/



Michael McCulloch
Pine Street Foundation
124 Pine Street
San Anselmo, CA 94960-2674
tel:	415-407-1357
fax: 	206-338-2391
[email protected]







*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index