Bookmark and Share

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: RE: 'Observations differ'


From   "Shittu, Aminu" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: RE: 'Observations differ'
Date   Sun, 4 Dec 2011 18:04:04 -0800 (PST)

Hi Elan,

I learnt that I only can compare nested models and I need to have the same observations included.

I removed one var from the model, say var x3

Then the reduced command was: 

xi: logistic y x1 x2 if x3!=.

where != means not equal

Thank you.

Aminu. 



________________________________
From: "Cohen, Elan" <[email protected]>
To: "[email protected]" <[email protected]> 
Sent: Friday, December 2, 2011 3:07:45 PM
Subject: st: RE: 'Observations differ'

Aminu,

As many on this list will be quick to point out, it helps immensely if we can see the actual code you are typing.

However, my guess is that you are including a variable with some missingness causing the number of observations to be reduced in your bigger model (i.e. the one with more parameters).  One approach is to run your bigger model first then run the smaller model only using the observations included in the bigger model.  Something like:

xtmelogit x1-x10
g byte esample = e(sample)
xtmelogit x1-x9 if esample

HTH,

- Elan


--
Elan D Cohen, MS
Center for Research on Health Care Data Center
University of Pittsburgh 
[email protected]



-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Shittu, Aminu
Sent: Friday, December 02, 2011 9:25
To: [email protected]
Subject: st: 'Observations differ'

To clarify on the message below. I am trying to develop a random effect logistic regression model.

A




----- Forwarded Message -----
From: "Shittu, Aminu" <[email protected]>
To: "[email protected]" <[email protected]>
Cc: 
Sent: Friday, December 2, 2011 2:07:19 PM
Subject: 'Observations differ'

Dear Statalisters,

I am trying to do the LRT to compare full and reduced models but I am having problem with the "observations differ: 770 vs. 825" output. The first two LRTs worked well. How can I handle this, please?

Kind regards,


Aminu.


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


*
*   For searches and help try:
*  http://www.stata.com/help.cgi?searchhttp://www.stata.com/support/statalist/faqhttp://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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index