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

Re: st: xtlogit


From   Michael Ingre <[email protected]>
To   [email protected]
Subject   Re: st: xtlogit
Date   Sat, 17 Jul 2004 12:22:23 +0200

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.

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

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.

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

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.

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