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: OBS xtlogit/xtreg
From
Nerissa Fanoembi <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: OBS xtlogit/xtreg
Date
Tue, 12 Nov 2013 23:01:58 +0100
I carried out a xtlogit, depvar indepvar fe estimation and the
estimation output indicates a note that “n groups are dropped because of
all positive or all negative outcomes”. This means that there is not
within individual variation in the outcome variable for n individuals. I
am wondering if there is a command that gives me the number of
individuals that do not have within individual variation in a variable,
or as a matter of fact in the dependent variable. The issue here is that
before the “xtlogit, depvar indepvar, fe” estimation I was busy with
carrying out “xtreg, depvar indepvar, fe” estimation and the estimation
output of xtreg does not tell me that n individuals do not have within
individual variation. Hence I coincidentally discovered after I have run
the xtlogit estimation that n individuals do not have within individual
variation. In principle I suppose I could create a variable using a
code like "by ID: gen newvar = sum(depvar != depvar[_n-1])” which could
show if values of depvar differ across time within each individual and
then I could count the cases that this does not happen. But still, I am
wondering if there is a more formal or simpler Stata command that can be
used to check how many individuals do not have within individual
variation in a variable. I also would like to ask why the "xtreg depvar indepvar, fe"
would not give a note like "xtlogit depvar indepvar, fe" gives about the individuals that
have no within individual variation.
> Date: Mon, 11 Nov 2013 18:19:15 -0500
> Subject: Re: st: OBS xtlogit/xtreg
> From: [email protected]
> To: [email protected]
>
> Nerissa, check the messages that xtlogit produces. It does drop groups
> under certain conditions, as the following example illustrates:
> *************************************************
> version 12.0
> sysuse bplong, clear
> xtset patient
> replace bp=bp>146
> replace age=age+1 if mod(_n,2)==0
> xtreg bp age sex, fe vce(robust)
> xtlogit bp age sex, fe
> *************************************************
> Hope this helps.
>
> Best, Sergiy Radyakin
>
>
> On Mon, Nov 11, 2013 at 5:35 PM, Alfonso Sanchez-Penalver
> <[email protected]> wrote:
>> Hi Nerissa,
>>
>> I believe that it is joy possible to answer your question with the information you provide. Please describe the response and explanatory variables better. Also you may want to show your exact commands so that we can get a better picture of the situation you are facing.
>>
>> Best regards,
>>
>> Alfonso Sanchez-Penalver
>>
>>> On Nov 11, 2013, at 5:09 PM, Nerissa Fanoembi <[email protected]> wrote:
>>>
>>> Hello,
>>>
>>> I research the effect of background characteristics (education, income and gender for example) on risk preferences over time.
>>>
>>> I want to run the model by using xtreg, fe or xtlogit, fe.
>>>
>>> By running xtreg, fe vce(robust) the obs are 1999 and by running the same regression with xtlogit, fe with and without vce(bootstrap) the obs are 800.
>>>
>>> How is it possible that xtlogit has significantly lower observations than xtreg?
>>>
>>> I am looking forward to hearing from you.
>>>
>>> Best Regards,
>>>
>>> Nerissa.
>>> *
>>> * For searches and help try:
>>> * http://www.stata.com/help.cgi?search
>>> * http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/