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   Amy Dunbar <[email protected]>
To   [email protected]
Subject   Re: st: gllamm question - estimating 4 random effects
Date   Wed, 14 Jul 2004 17:19:42 -0400

Thank you, Michael and Stas for your help with gllamm. I am learning so
much, but I am still struggling with the time effect.  I have summarized
your responses below.  Michael, I do not want a random intercept. I want
firm and time effects with respect to the return variable (R); DR is simply
a dummy for whether the firm return is negative; it has nothing to do with
time.  If YR is my year variable, how would I incorporate the time effect?
In SAS, the year variable is set up the same as the i(gvkey) variable.  
  
For example, proc mixed; class gvkey yr.  

Do I have to create the year*return interaction for gllamm? What would it
mean if I said
i(gvkey yr)?  Would that simply give me random intercepts for firm and year?
I don't want that. 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

Date: Tue, 13 Jul 2004 12:42:12 +0200
From: Michael Ingre <[email protected]>
Subject: Re: st: gllamm question - estimating 4 random effects

Hi Amy

I Think the following soloution will give you what you want. The emans and
standrad deviations  of the random effects will be stored in um1-um4 and
us1-us4. 

. gen R_DR   = R*DR  

. eq int   : const
. eq R     : R
. eq DR    : DR
. eq R_DR  : R_DR

. gllamm y R DR R_DR , i(gvkey) nrf(4)eqs(int R DR R_DR) adapt 
. gllapred u , u


I bit of caution though, 4 random effects is quite a lot for gllamm , 
especially with a continous outcome. You are likely to end up with a model 
that take hours (or even days) to converge. You might want to try with fewer

integration points first and then increase them to get to the final
solution:

. gllamm y R DR R_DR , i(gvkey) nrf(4)eqs(int R DR R_DR) adapt nip(3) .
matrix b = e(b) . gllamm y R DR R_DR , i(gvkey) nrf(4)eqs(int R DR R_DR)
adapt nip(8) from(b)

and the test if it was enough integration points with a final model:

. matrix b = e(b)
. gllamm y R DR R_DR , i(gvkey) nrf(4)eqs(int R DR R_DR) adapt nip(16)
from(b)

Michael

Date: Tue, 13 Jul 2004 12:53:37 -0400 (EDT)
From: Stas Kolenikov <[email protected]>
Subject: Re: st: gllamm question - estimating 4 random effects

another word of caution is that IMHO the random effects are not consistently
estimated, so one cannot be as serious about them as to put them into
another model.

 ---                                    Stas Kolenikov
 --       Ph.D. student in Statistics at UNC-Chapel Hill
 - http://www.komkon.org/~tacik/  -- [email protected]


Date: Tue, 13 Jul 2004 19:37:42 +0200
From: Michael Ingre <[email protected]>
Subject: Re: st: gllamm question - estimating 4 random effects

On 2004-07-13, at 18.53, Stas Kolenikov wrote:

> another word of caution is that IMHO the random effects are not 
> consistently estimated, so one cannot be as serious about them as to 
> put them into another model.

You could of course use the -geqs()- option of -gllamm- to model the 
random effects as dependent variables in the same model. However, what 
do you think about using the estimated standard deviation of the random 
effects to calculate a probability weight and use that probability 
weight in a second model?

Michael

Date: Tue, 13 Jul 2004 22:06:02 +0200
From: Michael Ingre <[email protected]>
Subject: Re: st: gllamm question - estimating 4 random effects

On 2004-07-13, at 21.35, Stas Kolenikov wrote:

>> Myself writing:
>> You could of course use the -geqs()- option of -gllamm- to model the 
>> random effects as dependent variables in the same model. However, 
>> what do you think about using the estimated standard deviation of the 
>> random effects to calculate a probability weight and use that 
>> probability weight in a second model?
>
> Well I am not sure I see how this would be done. Stata does have the 
> analytical weights that are related to variances... but here you've 
> only got one estimate, not observation-by-observation variances. The
> estimate
> of the RE variance is consistent (provided there is no model
> misspecification of course), so you can use it in any way you want. 
> That's
> my view on this.

I think I need to clarify. -gllapred- estimates subject specific 
standard deviations and means (i.e. one estimate for every subject). 
Now, if the theory is that there is a "true" subject specific effect 
and that effect is approximated as a random effect with a mean and a 
standard deviation over a series of repeated measures, then it should 
be ok to use the standard deviation of this estimate to calculate a 
weight that adjust for uncertainties in the estimate.

My question is if you think that a subject specific probability weight 
could be used to model this uncertainty of the estimated random effects 
in a second model?

I haven't tried it yet but, I have a few ideas of exploring individual 
differences in some of my data. It is possible (in theory) to model 
most these models directly with -�gllamm-. However, it is often not 
feasible because of the heavy burden on my computer.

Michael

Date: Tue, 13 Jul 2004 18:53:21 -0400 (EDT)
From: Stas Kolenikov <[email protected]>
Subject: Re: st: gllamm question - estimating 4 random effects

> I think I need to clarify. -gllapred- estimates subject specific 
> standard deviations and means (i.e. one estimate for every subject). 
> Now, if the theory is that there is a "true" subject specific effect 
> and that effect is approximated as a random effect with a mean and a 
> standard deviation over a series of repeated measures, then it should 
> be ok to use the standard deviation of this estimate to calculate a 
> weight that adjust for uncertainties in the estimate.
>
> My question is if you think that a subject specific probability weight 
> could be used to model this uncertainty of the estimated random 
> effects in a second model?

sound neat to me... but then those still won't be the -pweights-, but rather
-aweights-, as I thought before. Other than that... I think I need to take a
-gllamm- class either at JSM or NASUG :))

 ---                                    Stas Kolenikov
 --       Ph.D. student in Statistics at UNC-Chapel Hill
 - http://www.komkon.org/~tacik/  -- [email protected]

Amy Dunbar 
Department of Accounting 
School of Business 
University of Connecticut 
2100 Hillside Road, Unit 1041 
Storrs, CT 06269-1041 
Office: BUS 431 
Telephone: 860/486-5138 
Fax: 860/486-4838 
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.
*
*   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