Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Generalized Least Squares Regression"

    I'm trying to run a Generalized Least Squares Regression in Stata. I put quotes in the title, because this is how it is referred into the Finance literature (for example a textbook: Cochrane (2005) "Asset Pricing"), but I'm getting the impression that GLS may mean different things in different contexts.

    Here is the model:
    Cross Section Data

    Regression: Y = X'B + e

    where:

    B = (X'S-1X)-1X'S-1Y

    where: S = cov(ee')

    With some explanation:

    A GLS regression can be understood as a transformation of the space of returns, to focus attention on the statistically most informative portfolios. Finding (say, by Choleski decomposition) a matrix C such that CC' = S-1 the GLS regression is the same as an OLS regression of CY on CX.

    Sorry, if I am crazy. When I look for GLS, I see feasible GLS, which seems different. Perhaps, I have the wrong terminology.

  • #2
    Should I be using xtgls Y X, panels(h) ?

    If I set, they time variable to be 1 and the panel variable to be and identifier for each observation, am I getting the model I want.

    Comment


    • #3
      Sigh, it looks like I have this wrong. The cov(ee') comes from a time series regression. It isn't the error in the cross-sectional regression. The cross-sectional regression is the means (Y and estimated X's) from a time series regression. Sorry for the ill posed question. I will try to better understand what I'm trying to do.

      Comment


      • #4
        I just stumbled across this thread. I think much of the confusion is caused by different terminology used. Cochrane's Generalized Least Squares Estimator is what some people might refer to as the Weighted Least Squares Estimator. It is called weighted because of the weighting matrix $$\mathbf{W}$$ that goes into the estimate $$(\mathbf{X'WX})^{-1}\mathbf{X'WY}$$. In our context $$\mathbf{W}$$ is $$\Sigma^{-1}$$, the variance-covariance-matrix of the residuals from the time-series regressions. Using this matrix as weighting matrix will lead to underweighting of observations with large residuals and an overweighting of observations with small residuals (this is what Cochrane means with "most informative"). As for the Stata Code, I would usually use aweights with regress but this would not allow for non-zero off-diagonal elements in $$W$$ so I would also be very happy if someone jumps in here. Otherwise, my recommendation would be to use Mata and to work with the matrices directly.

        Comment

        Working...
        X