Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Questions about selmlog and svyselmlog
From
"Joao Ricardo F. Lima" <[email protected]>
To
[email protected]
Subject
Re: st: Questions about selmlog and svyselmlog
Date
Thu, 21 Oct 2010 16:45:14 -0200
Yu,
your data structure is wrong. This is the correct way:
> depvar varlist, select ( depvar_m = varlist_m)....
>
> 500 x 1 z
> 456 x 1 z
> 529 x 1 z
> 601 x 1 z
> . x 2 z
> . x 2 z
> . x 2 z
> . x 3 z
> . x 3 z
> . x 3 z
> . x 3 z
> . x 3 z
>
Joao Lima
2010/10/21 Yu(Sophia) Zhang <[email protected]>:
> Dear Joao,
>
> Thanks for your patient explanation. I thought I understood what
> you mean. But when I followed the rule and made sure that the
> dependent variable has non-missing values for only one category, the
> same error still showed up.
>
> What I understand the correct data structure about missing values
> of depvar is like this:
>
> depvar varlist, select ( depvar_m = varlist_m)....
>
> 500 x 1 z
> 456 x 1 z
> 529 x 1 z
> 601 x 1 z
> miss x 2 z
> 547 x 2 z
> 408 x 2 z
> 620 x 3 z
> 599 x 3 z
> 512 x 3 z
> miss x 3 z
> miss x 3 z
>
> So the depvar has non-missing values for category 1 only. It has
> missing values for all the other categories (2 and 3).
>
> Would you please kindly correct me if I am wrong?
>
> I appologize to ask another question. If the command works, how
> could save the variable lambda (Heckman correction term)?
>
> I appreciate your help a lot!
>
> Yu
>
>
>
>
> On Wed, Oct 20, 2010 at 11:08 AM, Joao Ricardo F. Lima
> <[email protected]> wrote:
>> Dear Yu,
>>
>> the sintax of selmlog is:
>>
>> selmlog depvar varlist, select(depvar_m=varlist_m) [lee dmf(#) dhl(# [all]) etc
>>
>> depvar_m is your categorical variable, with more than 2 categories, oks?
>>
>> and
>>
>> depvar must have non-missing values for only one of theses categories.
>>
>> HTH,
>>
>> JL
>>
>>
>>
>> 2010/10/20 Yu(Sophia) Zhang <[email protected]>:
>>> Dear Joao,
>>>
>>> Thanks so much for your reply. The second question has been solved
>>> following your suggestion.
>>>
>>> For the first one, do you mean that across all categories ( which
>>> are schools in my selection equation), only one category can have
>>> non-missing values of dep var, and the other categories must have some
>>> missing values of depvar? I deleted some values of depvar to meet this
>>> requirement, but I still got the same error. Would you mind explaining
>>> it in more detail?
>>>
>>> Thank you so much!
>>>
>>> Yu
>>>
>>> On Tue, Oct 19, 2010 at 7:03 PM, Joao Ricardo F. Lima
>>> <[email protected]> wrote:
>>>> Yu,
>>>>
>>>> About the first question:
>>>>
>>>> The vardep of the income equation must have non missing values ONLY
>>>> for one category.
>>>>
>>>> About the second:
>>>>
>>>> the svyselmlog was written to Stata 8. Then, try this:
>>>>
>>>> version 8: svyset [pweight = varw], psu(varpsu) strata(varstrat)
>>>> svyselmlog vardep varindep , sel() meth() boot()....
>>>>
>>>> Hope this Helps,
>>>>
>>>> Joao Lima
>>>>
>>>>
>>>> 2010/10/19 Yu(Sophia) Zhang <[email protected]>:
>>>>> Dear statisticians,
>>>>>
>>>>> I am now working on my dissertation and am stuck by a STATA command.
>>>>> Basically, I want to run Heckman correction based on the multinomial logit
>>>>> model. I am going to use the command selmlog. However, a strange error shows
>>>>> up like this:
>>>>>
>>>>> Non-missing values of dependent variable for more than one outcome
>>>>> variable _m* not found
>>>>>
>>>>> I guess it might be associated with this statement in the help file:
>>>>>
>>>>> 1) In the output, selmlog adds to varlist a series of variables labelled
>>>>> _m[depvar_m value], except for the dhl option
>>>>>
>>>>> 2) The outcome variable depvar is observed for only one value of depvar_m.
>>>>> It is important that depvar should have missing values for any other value
>>>>> of depvar_m.
>>>>>
>>>>> But still cannot figure out what's wrong.
>>>>>
>>>>> In addition, when I want to control for sampling weights by running the
>>>>> command svyselmlog, I get another error:
>>>>>
>>>>> data not set up for the old survey estimation commands; use svyset under
>>>>> version control or use the new svy prefix.
>>>>>
>>>>> But there is no "svy: selmlog" command in STATA 11.....
>>>>>
>>>>> I wonder if someone could kindly give me some hint for these two
>>>>> problems. I have asked several people but no one were familiar with this
>>>>> problem.
>>>>>
>>>>> I appreciate your help very much.
>>>>>
>>>>> Sincerely,
>>>>>
>>>>> Yu
>>>>>
>>>>> *
>>>>> * 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/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ---------------------------------------------------------
>>>> João Ricardo F. de Lima
>>>> Pesquisador A - Economia Aplicada
>>>> Embrapa Semiárido
>>>> e-mail: [email protected]
>>>> fone: +55 (87) 3862-1711 Ramal: 167
>>>> home-page: www.cpatsa.embrapa.br
>>>> ----------------------------------------------------------
>>>>
>>>> *
>>>> * 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/
>>>>
>>>
>>>
>>>
>>> --
>>> Yu Zhang
>>> PhD Candidate
>>> Economics and Education
>>> Teachers College, Columbia University
>>>
>>> *
>>> * 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/
>>>
>>
>>
>>
>> --
>> ---------------------------------------------------------
>> João Ricardo F. de Lima
>> Pesquisador A - Economia Aplicada
>> Embrapa Semiárido
>> e-mail: [email protected]
>> fone: +55 (87) 3862-1711 Ramal: 167
>> home-page: www.cpatsa.embrapa.br
>> ----------------------------------------------------------
>>
>> *
>> * 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/
>
--
---------------------------------------------------------
João Ricardo F. de Lima
Pesquisador A - Economia Aplicada
Embrapa Semiárido
e-mail: [email protected]
fone: +55 (87) 3862-1711 Ramal: 167
home-page: www.cpatsa.embrapa.br
----------------------------------------------------------
*
* 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/