Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Wald test limit?


From   Keith Dear <[email protected]>
To   [email protected]
Subject   st: Wald test limit?
Date   Tue, 05 Feb 2008 09:41:08 +1100

A student of mine is fitting large nbreg models. One such successfully estimates 262 parameters (not including alpha) but the Wald test reports only 256df - anyone know why? Of course 256 is a suspiciously round number so probably it's just a limit, but there's a further wrinkle:

This model was arrived at using stepwise, then fitted anew by listing the terms that stepwise kept (thus keeping a few more rows of data). The two logs show exactly the same 262 parameters (with slightly different estimates), yet the stepwise ends with a Wald test on 255 df, not even 256 - why?

* code for the two fits ($BASE lists many terms):
xi: stepwise, pr(0.05) lockterm1: nbreg rrv_count ($BASE) (i.fin_year)
(NDVI_Q0 NDVI_Q1 NDVI_Q2 NDVI_Q3)
(NDVImax_Q0 NDVImax_Q1 NDVImax_Q2 NDVImax_Q3)
(NDVImin_Q0 NDVImin_Q1 NDVImin_Q2 NDVImin_Q3)
(igreys_Q0 igreys_Q1 igreys_Q2 igreys_Q3 noigreys_Q0 noigreys_Q1 noigreys_Q2 noigreys_Q3)
(ireds_Q0 ireds_Q1 ireds_Q2 ireds_Q3 noireds_Q0 noireds_Q1 noireds_Q2 noireds_Q3),
exposure(person_days) cl(pcode)

* result: stepwise drops all three (NDVI) sets but keeps the (greys) and (reds)
* therefore augment $BASE to include all (greys) and (reds):
glo BASE $BASE igreys_Q0 igreys_Q1 ... noireds_Q3
xi: nbreg rrv_count (i.fin_year) $BASE, exposure(person_days) cl(pcode)

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index