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: Observations differ
From
"Shittu, Aminu" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Observations differ
Date
Sun, 23 Sep 2012 06:17:26 -0700 (PDT)
Going by Brendan suggestion, I am not sure I am doing it right it as I am getting "if e(sample) invalid" response. Here is what I did
xi:xtlogit y i.x1 i.x2 i.x3 i.x4, i(animalid)re or
est store a
xi:xtlogit y i.x1 i.x2 i.x3, i(animalid)re or if e(sample)
Aminu
----- Original Message -----
From: Brendan Halpin <[email protected]>
To: [email protected]
Cc:
Sent: Sunday, September 23, 2012 1:23:12 PM
Subject: Re: st: Observations differ
On Sun, Sep 23 2012, Shittu, Aminu wrote:
> Hi all
>
> I am trying to compare, using likelihood ratio test, between the full
> and reduced model in a random effect logistic regression; but the output
> is saying "observations differ: 3356 vs. 3583." How can I handle this
> problem, please.
>
> Aminu.
// fit the full model first
xtlogit y x1 x2 etc...
est store full
// fit the reduced model on the estimation sample of the full model
xtlogit y x1 etc... if e(sample)
lrtest full
You probably have cases that are missing on one or more of the
additional variables in the full model, which have full information on
all the variables in the reduced model.
Regards,
Brendan
--
Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F1-009 x 3147
mailto:[email protected] ; ULSociology on Facebook: http://on.fb.me/fjIK9t
http://teaching.sociology.ul.ie/bhalpin/wordpress ; twitter:@ULSociology
*
* 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/