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

Re: st: RE: fixed, random effects

From   Raphael Schoenle <schoenle@Princeton.EDU>
Subject   Re: st: RE: fixed, random effects
Date   Mon, 28 Nov 2005 10:33:01 -0500

Hi Scott,

I just tried to run the example you sent me- does it work on your computer? (i have stata se/8.2) I get an error message as below.
Thank you very much for the valuable hint!



Here is what I get:

. webuse grunfeld, clear

. areg invest mvalue [aw = kstock], ab(com)

Number of obs = 200
F( 1, 189) = 327.94
Prob > F = 0.0000
R-squared = 0.9082
Adj R-squared = 0.9033
Root MSE = 120.16

------------------------------------------------------------------------ ------
invest | Coef. Std. Err. t P>|t| [95% Conf. Interval]
------------- +----------------------------------------------------------------
mvalue | .2971024 .0164063 18.11 0.000 .2647394 .3294654
_cons | -226.6022 30.39757 -7.45 0.000 -286.5643 -166.6401
------------- +----------------------------------------------------------------
company | F(9, 189) = 18.251 0.000 (10 categories)

. rfregk invest mvalue [aw = kstock]
invalid syntax

end of do-file

On Nov 28, 2005, at 8:50 AM, Scott Merryman wrote:

For fixed effects with weights you could use -areg- and for random effects
you could use Kevin McKinney's -rfregk-

webuse grunfeld, clear

areg invest mvalue [aw = kstock], ab(com)

rfregk invest mvalue [aw = kstock]

Hope this helps,

[] On Behalf Of Raphael Schoenle
Sent: Sunday, November 27, 2005 10:18 AM
Subject: st: fixed, random effects

Hi everyone,

I have tried to solve a simple problem for days but I can't figure out how
to run it properly in Stata. If someone could give me a hint, this would be
really great.

Basically, I want to run a standard fixed, and random effects regression
(xtreg in STATA) but with _variable_ weights (they correspond to changing
industry shares in the market).

So, for the random effects I tried gllamm but always get an error message of
insufficient observations when I try to use weights.

Here is what I do:

sort ind7090
gllamm dsc dperc dcomp, i(ind7090) pw(wt)

any ideas what goes wrong?

(if there are no weights, then we just get the xtreg dsc dperc dcomp, fe



* For searches and help try:
*   For searches and help try:

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