Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: xtlogit


From   David Airey <[email protected]>
To   [email protected]
Subject   Re: st: xtlogit
Date   Sun, 18 Jul 2004 12:15:08 -0500

On 2004-07-16, at 22.51, David Airey wrote:


I have N white bags and N black bags filled with 1000 marbles each. Marbles comes in 10 colors. There is bag to bag variation in the proportion of each color marble in a bag, and an unknown white and black bag treatment effect on the distribution of proportions of marbles. I only get to sample X marbles per bag.
You might want to have a look at -gllamm-. It will enable you to specify your problem as a multi-level model.

. gllamm marblecolor treatment , i(marbleid bagid) link(mlogit) fam(bin) adapt trace

The above statement will give you random intercepts for bagid that will allow bags to vary in propensity for different colors.

. gllamm marblecolor treatment , i(marbleid bagid bagcolor) link(mlogit) fam(bin) adapt trace

The above statement will in addition give you a random intercept for bagcolor.
Thanks! At least I have an excuse to look at gllamm and buy more books!


-gllamm- is not very fast, and what I have seen from your earlier postings (on ANOVA) you might sit on quite a number of marbles. There are techniques to speed up -gllamm- by -contract- data and use frequency weights. I think you should have a close look at them. For your data it might improve speed ten times or even more. The speed of -gllamm- is almost proportional to the number of (weighted) observations in the dataset.
This is a separate problem from my ANOVAs, and the data are not as complicated or large.



Also, I have no personal experience from using an _mlogit_ link but I suspect that this model will be very complicated , especially if you have 10 colors on your marbles. You might want to look at other ways of specifying you problem.
It turns out there is a natural control comparison marble color, and the other color can be meaningfully recoded to one category, so a binary dependent is possible. But we are wishing to explore optimal sampling when different bag random effects (different intraclass correlations for bag), and different fixed treatment effects for bag color are present, how to properly sample each level for the most power to detect the treatment effect (the random effect is nuisance rather than an interest). From what you have said, I'll look at power studies in multilevel models for help. That's more than I knew last week.



-gllamm- is extremely flexible and comes with a wide variety of link functions. I'm sure you can find a way to specify your model with -gllamm- but you might also want to have a talk with your boss so he can hook you up with a super computer. My own experience is that sometimes you have to allow -gllamm- to work for a few days before you have the answer. But then, it is a really good answer.
Yikes. I'll simplify my problem first!


I'm going on vacation so I will not be able to continue this discussion however, I'm a curious guy. You are very welcome to e-mail me in private with your experiences in using -gllamm- with marbles. I will respond in a few weeks.
I'll do so, when I get that far!


There is a -gllamm- manual at www.gllamm.org that will give more information than the help file. There is also a book on -gllamm- due this year at Stata Press. And also this book that are very good on the technical aspects: http://www.stata.com/bookstore/glvm.html

Michael

*
*   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