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]
st: AW: lrtest of nested logistic models with vce(cluster) specified
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: AW: lrtest of nested logistic models with vce(cluster) specified
Date
Sat, 6 Mar 2010 16:29:05 +0100
<>
You can -force- the thing, at your own peril:
*************
webuse union, clear
logit union age grade not_smsa south##c.year, vce(cluster id)
est sto a
logit union age black grade not_smsa south##c.year, vce(cluster id)
est sto b
lrtest b a, force
*************
Cameron and Trivedi, 2009, have an example on their page 401/402. (1st ed.:
http://www.stata-press.com/books/mus.html)
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Lily Yor
Gesendet: Samstag, 6. März 2010 00:03
An: [email protected]
Betreff: st: lrtest of nested logistic models with vce(cluster) specified
Hi, I have two nested binary logistic regression models, both of which have
vce(cluster) specified to account for intraclass clustering at the classroom
level. For example, my Stata commands look like this in simplified form:
logit [dep var] [ind_var1], vce(cluster class_id)
est store A
logit [dep var] [ind_var1 ind_var2], vce(cluster class_id)
est store B
I would like to test whether model B fits the data significantly better than
model A, so I ran the lrtest, but Stata gives me this error:
. lrtest A
LR test likely invalid for models with robust vce
How do I test the fit of these nested models if I cannot use lrtest? I
found a similar question posted by another user earlier in the archives but
it was never answered. I would much appreciate any and all tips.
Best,
Lily
*
* 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/