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]
Re: st: negative variance?
Maarten Buis <email@example.com>
Re: st: negative variance?
Tue, 25 Jun 2013 13:40:00 +0200
Before trying anything fancy, I would first make sure that all the
explanatory variables have the value 0 at a reasonable point within
the range of the data. Often people choose the mean, which is an ok
default but not a necessary choice. For example, when one has years of
education in the US system it may make more sense to center at 12
years of education (high school) rather than the mean.
The logic behind this advise is that random effects models add one or
more extra models for the constant. Finding reasonable estimates is a
lot easier if that constant is something that is within the range of
the data. For example if one of the variables is year of birth, than
the constant would refer to someone born in the year 0, which is often
an extreme extrapolation. In the kind of datasets I have it often
makes sense the create a new variable like so -gen c_byr = (byr -
1950) / 10-, i.e. c_byr is year of birth in decades since 1950 (1950
is typically well within the range of my data, but that obviously does
not have to be true for other datasets).
Hope this helps,
On Tue, Jun 25, 2013 at 1:11 PM, Hanne F <firstname.lastname@example.org> wrote:
> I am currently using a two-level random slope model, logistic regression.
> The reason I use multilevel is to control for a possible design effect. I am
> using xtmelogit, but I already tried glamm and xtlogit as well. I have data
> for three measurements. When running the same model on the first two
> measurements, I do not experience any problems. By contrast, for the third
> measurement, I do not seem to get an accurate estimation of the second level
> variance. Sd_cons is virtually zero, and the confidence interval is also
> odd: I get exactly 0 as a lower point, and a '.' as upper bound. The p-value
> indicating whether or not it is necessary to use a multilevel design gives
> exactly zero. Can anyone tell me why this is the case?
> In a multilevel course based on MLWin I learned that in this case you should
> 'allow for negative variance'. Can anybody please tell me how I could do
> this with Stata?
> thank you very much in advance!!
> best regards,
> View this message in context: http://statalist.1588530.n2.nabble.com/negative-variance-tp7580385.html
> Sent from the Statalist mailing list archive at Nabble.com.
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
Maarten L. Buis
* For searches and help try: