[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

# Re: st: (Feasible) generalized least squares

 From "Clive Nicholas" <[email protected]> To [email protected] Subject Re: st: (Feasible) generalized least squares Date Tue, 16 Jan 2007 21:33:55 -0000 (GMT)

```Herbert Smith wrote:

> For a garden-variety, cross-sectional regression, an estimator of
>
> var(b)
>
> is
>
> var(b)=invsym(X'*W*X)
>
> where X is the design matrix and W is a diagonalized weight matrix.
>
> Is there a way in Stata to get the FGLS estimated var-cov in a single
> command?  By which I mean:
>
> -regress depvar indvars [pweight=w]-
>
> gives the GLS estimates for b
>
> b=invsym(X'*W*X)*(X'*W*y)
>
> but the standard errors are computed as though
>
> -regress depvar indvars [pweight=w], vce(robust)-
>
> and are close to the FGLS estimates, but are not the same....

Isn't this satisfactory?

. webuse grunfeld, clear

. tsset company year
panel variable:  company (strongly balanced)
time variable:  year, 1935 to 1954

. xtgls invest mvalue kstock time

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        homoskedastic
Correlation:   no autocorrelation

Estimated covariances      =         1        Number of obs      =       200
Estimated autocorrelations =         0        Number of groups   =        10
Estimated coefficients     =         4        Time periods       =        20
Wald chi2(3)       =    867.82
Log likelihood             = -1191.645        Prob > chi2        =    0.0000

----------------------------------------------------------------------------
invest |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
mvalue |   .1163783   .0059669    19.50   0.000     .1046834    .1280732
kstock |   .2213351   .0302499     7.32   0.000     .1620463    .2806239
time |   .7737904   1.377808     0.56   0.574    -1.926665    3.474245
_cons |  -49.14306   14.83261    -3.31   0.001    -78.21443   -20.07169
----------------------------------------------------------------------------

. matrix list e(V)

symmetric e(V)[4,4]
mvalue      kstock        time       _cons
mvalue    .0000356
kstock  -.00009563   .00091506
time   .00200231  -.02292234   1.8983561
_cons  -.03314052   .09155466  -15.771641   220.00619

Or am I missing something? :)

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   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