# Re: st: Fixed effect model with weight: xtivreg2 [aweight],fe?

 From "Scott Merryman" <[email protected]> To [email protected] Subject Re: st: Fixed effect model with weight: xtivreg2 [aweight],fe? Date Fri, 1 Aug 2008 14:41:18 -0500

```You could use -areg-  or -xtivreg2-

For example:

. webuse grunfeld

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

Linear regression, absorbing indicators                Number of obs =     200
F(  1,   189) =  327.94
Prob > F      =  0.0000
R-squared     =  0.9082
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)

. xtivreg2 invest mvalue [aw = kstock],  small fe

FIXED EFFECTS ESTIMATION
------------------------
Number of groups =        10                    Obs per group: min =        20
avg =      20.0
max =        20

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics consistent for homoskedasticity only

Number of obs =      200
F(  1,   189) =   327.94
Prob > F      =   0.0000
Total (centered) SS     =  7463301.849                Centered R2   =   0.6344
Total (uncentered) SS   =  7463301.849                Uncentered R2 =   0.6344
Residual SS             =   2728695.85                Root MSE      =    120.2

------------------------------------------------------------------------------
invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
mvalue |   .2971024   .0164063    18.11   0.000     .2647394    .3294654
------------------------------------------------------------------------------
Included instruments: mvalue
------------------------------------------------------------------------------

Scott

On Thu, Jul 31, 2008 at 11:50 PM, Dohan Kim <[email protected]> wrote:
> Hello Statalist members,
> I'd like to run a fixed effect model with an analytic weight. "xtreg,
> fe" doesn't allow a weight option, and some people in this forum
> suggested to use xtivreg2 [aweight=],fe. Can I use "xtivreg2,fe" even
> though I don't have any endogenous variables? In other words, can
> "xtivreg2 [aweight=],fe" be an alternative to a simple fixed effect
> model with a weight? If I can't use xtivreg2, are there any other ways
> I can run a fixed effect model with an analytic weight? I'll