OK, I am all set. It's finally working using the encode command! Thanks a
ton:)
S
> <>
>
> No, you don`t. -input- is just for illustration purposes. You turn your
> stringvars into numeric ones the way it is done at the end of the code
> via -encode-...
>
>
> HTH
> Martin
> _______________________
> ----- Original Message -----
> From: "Sohini Sahu" <[email protected]>
> To: <[email protected]>
> Sent: Saturday, June 06, 2009 11:36 PM
> Subject: Re: Re:st: Re: Creating a column from point estimates across
> observations
>
>
>> My dataset is in .dta file. Do I still use the "input" command for that?
>>
>> S
>>
>>
>>> <>
>>>
>>> Let me illustrate the last point...
>>>
>>> **********
>>> clear*
>>>
>>> input var1:mylabel str1 var2 , auto
>>> C C
>>> D D
>>> E E
>>> C C
>>> E E
>>> D D
>>> end
>>>
>>> compress
>>>
>>> //see the codes
>>> list, noobs nolabel
>>>
>>> //turn var2 into same format as var1
>>> encode var2, gen(var3)
>>>
>>> list, noobs nolabel
>>> **********
>>>
>>>
>>> HTH
>>> Martin
>>> _______________________
>>> ----- Original Message -----
>>> From: "Martin Weiss" <[email protected]>
>>> To: <[email protected]>
>>> Sent: Saturday, June 06, 2009 10:58 PM
>>> Subject: Re: Re:st: Re: Creating a column from point estimates across
>>> observations
>>>
>>>
>>>><>
>>>>
>>>> The -auto- option to-input- which accomplishes this feat is just a
>>>> shorthand version of -encode-. So use that and see whether -statsby-
>>>> works
>>>> properly then...
>>>>
>>>>
>>>> HTH
>>>> Martin
>>>> _______________________
>>>> ----- Original Message -----
>>>> From: "Sohini Sahu" <[email protected]>
>>>> To: <[email protected]>
>>>> Sent: Saturday, June 06, 2009 10:48 PM
>>>> Subject: Re: Re:st: Re: Creating a column from point estimates across
>>>> observations
>>>>
>>>>
>>>>> My original dataset contains millions of data. Is there a way to
>>>>> bypass
>>>>> the "input" command and use something else? Or should I switch to
>>>>> version
>>>>> 9 or 10 for this?
>>>>>
>>>>> S
>>>>>
>>>>>> <>
>>>>>>
>>>>>>
>>>>>> -help whatsnew- mentions that there was an issue with strings in
>>>>>> the -by-
>>>>>> option to -statsby- which were fixed between version 8 and 9. So
>>>>>> make
>>>>>> sure
>>>>>> you use my -input- command given earlier so that numeric codes get
>>>>>> passed
>>>>>> to
>>>>>> the -by- option...
>>>>>>
>>>>>>
>>>>>> HTH
>>>>>> Martin
>>>>>> _______________________
>>>>>> ----- Original Message -----
>>>>>> From: "Sohini Sahu" <[email protected]>
>>>>>> To: <[email protected]>
>>>>>> Sent: Saturday, June 06, 2009 10:19 PM
>>>>>> Subject: Re:st: Re: Creating a column from point estimates across
>>>>>> observations
>>>>>>
>>>>>>
>>>>>>> This is so strange. I have added the clear option to my command but
>>>>>>> it
>>>>>>> still does not work :-(
>>>>>>>
>>>>>>> statsby "regress score iq nutrit" _b, by(cid) clear
>>>>>>>
>>>>>>> S
>>>>>>> *
>>>>>>> * 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/
>>>>>>>
>>>>>>
>>>>>> *
>>>>>> * 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/
>>>>>>
>>>>>
>>>>> *
>>>>> * 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/
>>>>>
>>>>
>>>> *
>>>> * 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/
>>>>
>>>
>>> *
>>> * 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/
>>>
>>
>> *
>> * 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/
>>
>
> *
> * 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/
>
*
* 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/