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

Re: st: gllamm question - estimating 4 random effects


From   Michael Ingre <[email protected]>
To   [email protected]
Subject   Re: st: gllamm question - estimating 4 random effects
Date   Thu, 15 Jul 2004 12:36:32 +0200

On 2004-07-14, at 23.19, Amy Dunbar wrote:

The hypothesis is that firms are becoming more
conservative in their accounting as time goes by. We use the relationship
with negative return firms and EPS/price as a proxy for conservatism and we
expect conservatism of negative return firms to increase over time, but no
effect for positive return firms. Thus, we want to estimate an effect for
the yr variable with respect to its interaction with negative returns vs
positive returns.

. eq R : R (this would be the positive return/firm effect - right?)
. eq R_DR : R_DR (this would be the negative return/firm effect - right?)
. Eq R_YR : ?? (I need a positive return/year effect)
. Eq R_DR_YR: ?? (I need a negative return/year effect)

. gllamm y R DR R_DR , i(gvkey yr) nrf(4) eqs(R R_DR ? ? ) adapt
. gllapred u , u
Let see if i got this correctly. Your fixed effect model would then be (I assume you don't want to include interactions without controlling for main effects):

. gen R_DR = R*DR
. gen R_YR = R*YR
. gen R_DR_YR = R*DR*YR

. gllamm y YR R DR R_DR R_YR R_DR_YR , i(gvkey) ....

The next step is how you would like to model random (firm specific) effects. I think you need an intercept to allow for the firms to deviate in the overall level in y given the covariates:

. gen const = 1
. eq int : const

Then I think you want the firms to be able to have different slopes for year with respect to return:

. eq R_YR : R_YR
. eq R_DR_YR : R_DR_YR

Maybe also with respect to year:

. eq YR : YR

But I also think you should allow the firms to differ in level with respect to return (positive or negative)

. eq DR : DR

Which gives the gllamm command:

. gllamm y YR R DR R_DR R_YR R_DR_YR , i(gvkey) nrf(4) eqs(int R_YR DR R_DR_YR) ....

or

. gllamm y YR R DR R_DR R_YR R_DR_YR , i(gvkey) nrf(5) eqs(int YR R_YR DR R_DR_YR) ....

That would correspond to the following (simplified) equation with subscript for time (t) and firm (i) and the random part within parentheses:

y_it = int + YR_it + R_it + DR_it + R_DR_it + R_YR_it + R_DR_YR_it + (int_i + R_YR_i + DR_i + R_DR_YR_i) + (YR_i)

The above model above is a bit complicated and assumes that the return can be positive some years and negative some years for any given firm. If you have however, to groups of firms where one has negative and one has positive outcome I would suggest something like this:

. gen const = 1
. eq int : const
. eq R_YR : R_YR

. gllamm y YR R DR R_DR R_YR R_DR_YR , i(gvkey) nrf(2) eqs(int R_YR) ....

or

. gen const = 1
. eq int : const
. eq R_YR : R_YR
. eq YR : YR

. gllamm y YR R DR R_DR R_YR R_DR_YR , i(gvkey) nrf(3) eqs(int R_YR YR) ....

It is your theory and I can have gotten it completely wrong. But if you think about your problem in terms of fixed and random effects I think you could find a way to specify your model as you want by looking at the example above. Also, try to keep the number of random effects at a minimum because they really makes things harder for your computer.

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