Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Maarten buis <maartenbuis@yahoo.co.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: comparing two mim gllamm logistic models |

Date |
Mon, 7 Jun 2010 13:14:38 -0700 (PDT) |

--- On Mon, 7/6/10, jl591164@albany.edu wrote: > > For the second point, it seems to me that using the > > one half of the p value will take care of the boundary > > issue. --- On Mon, 7/6/10, Maarten buis wrote: > Unfortunately, the problem is more complicated than that, > the boundery problem influences the sampling distribution > under the null hypothesis, as was discussed in the > help-file I refered to earlier. You can ofcourse explore this point using simulation. You can look at the simulation below: it test a hypothesis that is true in the population, so the test statistic (chi2) should follow a chi square distribution, and the p-values should follow a uniform distribution. This is tested using -hangroot- which you need to download from SSC, type in Stata -ssc install hangroot-. The confidence intervals are there to take Monte Carlo error into account, i.e. you expect some variation from the theoretical distribution due to the fact that the simulation involves a random proces, the "confidence interval" tells you how much variation to expect. *---------------- begin example --------------------- program drop _all program define sim, rclass drop _all set obs 100 gen i = _n gen u = rnormal() expand 10 gen x = rnormal() gen y = 1 + 1*x + u + .5*rnormal() xtset i xtmixed y x || i: x, iterate(20) est store a if e(converged) { xtmixed y x || i:, iterate(20) if e(converged) { est store b lrtest a b return scalar p = r(p) return scalar ch2 = r(chi2) } } end simulate p=r(p) chi2=r(chi2), reps(500): sim hangroot p, dist(uniform) par(0 1) susp notheor ci hangroot chi2, dist(chi2) par(1) susp notheor ci *------------------- end example ------------------------ (For more on examples I sent to the Statalist see: http://www.maartenbuis.nl/example_faq ) Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- * * 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/

**References**:**Re: st: comparing two mim gllamm logistic models***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**st: RE: Importing EViews panel dataset into a STATA panel dataset** - Next by Date:
**Re: st: RE: standard deviation for the difference in means** - Previous by thread:
**Re: st: comparing two mim gllamm logistic models** - Next by thread:
**Re: st: comparing two mim gllamm logistic models** - Index(es):