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

From |
Keith Dear <keith.dear@anu.edu.au> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Wald test limit? |

Date |
Wed, 06 Feb 2008 09:54:20 +1100 |

I see I misread Maarten's reply - he doesn't in fact think 256 is one less than 262! Apologies, Maarten, I must be getting dyslexic.

But I still don't know why nbreg is fitting 262 parameters (including _cons) but then apparently testing only 256 of them. In the end perhaps it doesn't matter much, as a test of the whole model is not useful. But it is disconcerting, and having the df shown correctly at the top IS useful in comparing models.

Keith

At 03:09 PM 5/02/2008, you wrote:

Thanks Maarten, but it's not that easy.

The df are not one less than I expected, they are six less: 256 instead of 262.

Variables dropped through multicolinearity would not be estimated. The 262 parameters ARE all estimated, complete with (robust) SE etc: I counted them in the tabular nbreg output, and exactly the same 262 are estimated by stepwise and by nbreg directly. Yet the two Wald tests report different df, neither of them the expected 262 (actually 261, see below).

I know df are integer (usually, the Welch test being one exception), but that's not what I meant. 256 struck me as suspicious because it is 2^8. Perhaps Stata's Wald test algorithm was not designed to handle more than that (though in that case a warning at least would be nice). And that still doesn't explain the 255 from stepwise.

So I remain puzzled.

One correction: the 262 parameters include _cons, so the test "should" be on only 261 df, my mistake. But still neither 256 nor 255. And I should have pointed out that this is the Wald chi-squared test, replacing the LR chi2 because we have clustered data.

btw I rather feel I should apologise for fitting so many covariates: I know a lot of people will look askance at that and also at the use of stepwise regression. But (a) we do have a lot of data and (b) they are not really 261 covariates, they come in multi-df sets of 4 or 8 at a time. Still, any offence is regretted.

Keith

At 10:06 AM 5/02/2008, you wrote:

The fact that it is a round number is not suspicious, it should be an integer. One possible reason why it has less degrees of freedom than you expect is that Stata might have dropped some variables due to multicolinearity (this is a very real possibility when dealing with such a large number of predictors). Hope this helps, Maarten --- Keith Dear <keith.dear@anu.edu.au> wrote: > 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/ > ----------------------------------------- Maarten L. Buis Department of Social Research Methodology Vrije Universiteit Amsterdam Boelelaan 1081 1081 HV Amsterdam The Netherlands visiting address: Buitenveldertselaan 3 (Metropolitan), room Z434 +31 20 5986715 http://home.fsw.vu.nl/m.buis/ ----------------------------------------- ___________________________________________________________ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/ * * 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/* * 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/

Dr Keith B.G. Dear Senior Fellow in Biostatistics National Centre for Epidemiology and Population Health Australian National University Canberra, ACT 0200, Australia Tel: 02 612 54865, Fax: 02 612 50740 http://nceph.anu.edu.au/Staff_Students/staff_pages/dear.php CRICOS provider #00120C * * 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/

**Follow-Ups**:**Re: st: Wald test limit?***From:*Richard Williams <Richard.A.Williams.5@ND.edu>

**Re: st: Wald test limit?***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**References**:**st: Wald test limit?***From:*Keith Dear <keith.dear@anu.edu.au>

**Re: st: Wald test limit?***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**Re: st: Wald test limit?***From:*Keith Dear <keith.dear@anu.edu.au>

- Prev by Date:
**st: RE: Creating a new variable by combining several** - Next by Date:
**Re: st: Wald test limit?** - Previous by thread:
**Re: st: Wald test limit?** - Next by thread:
**Re: st: Wald test limit?** - Index(es):

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