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

st: gllamm question - estimating 4 random effects


From   Amy Dunbar <[email protected]>
To   [email protected]
Subject   st: gllamm question - estimating 4 random effects
Date   Mon, 12 Jul 2004 22:05:48 -0400

Title: Message
I have a PhD student who estimated the following equation using SAS proc mixed to generate variable firm- and time-specific coefficients.
 
y = a0 + a1DR + (B0 +B0i + B0t)R + (B1 + B1i +B1t)R*DR
 
where y is a firm-specific variable (earnings per share/price)
DR  = 1 if the return is negative (firms losing in the market)
R = firm return
i = 791 firms where the variable gvkey is unique for each firm
t = 13 years
 
I want to replicate her results using stata and I think I need to use gllaam.  We want to use the standardized random effects, B0i and B1i, as variables in another model. I have Rabe-Sesketh & Everitt's Handbook, which discusses gllaam with continuous data (post-natal depression data), but where that model has a random intercept and one random slope, this model has 4 random coefficients.
 
I know that I have to define the equations for the random effects, but I am confused about the time coefficients.
 
gen R_DR = R*DR
 
eq coeffB0i: R
eq coeffB0t: ?
eq coeffB1i: R_DR
eq coeffB1t: ?
 
gllamm y DR R R_DR, i(gvkey) nrf(4) eqs(coeffB0i coeffB0t coeffB1i coeffB1t) adapt
 
Could someone help me learn how to estimate this model in Stata? 
 
Also, how do I get Stata to give me the individual coefficients by firm?  Is there a command to standardize the coefficients? 
It appears that I use gllapred, but I'm not sure.
 
Thank you.
 
Amy Dunbar
Department of Accounting
School of Business
University of Connecticut
2100 Hillside Road, Unit 1041
Storrs, CT 06269-1041
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index