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

Re: st: Conditional probabilities with one fixed effect at a constant


From   Michael Ingre <[email protected]>
To   [email protected]
Subject   Re: st: Conditional probabilities with one fixed effect at a constant
Date   Fri, 9 Jul 2004 10:08:56 +0200

Dear list

This is how to do it.

. gllapred u , u // store means of random effects in um
. replace time = 4 // change the fixed effect to any value
. gllapred mu, mu us(um) // predict probabilities with the original random effects

The simplicity and beauty in the solution suggest that the good authors of -gllamm- had anticipated this need. Thanks a lot.

The trick is to predict the random effects before changing the fixed effects and supply them to -gllapred-. If the random effects are not supplied, -gllapred- calculates them from data using both independent and dependent variables which would of course give nonsense predictions if data had changed.

Thanks to Buzz who came very close to the solution.

On 2004-07-07, at 00.41, Winfield Scott Burhans wrote:


The key to what you are after is to use - gllapred prob, mu us(um) - to
obtain the predicted probabilities conditional on the random effects. You
will have to work out a scheme to either add observations with the fixed
effects you want, or change existing observations to have the constant
fixed effects you are after temporarily in order to plot them.
Michael

PS. If you get stuck, what you probably need is a good night sleep.

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