+ Reply to Thread
Results 1 to 7 of 7

Thread: (OLS) How to get sample variance-covariance matrix of residuals?

  1. #1
    Points: 1,980, Level: 26
    Level completed: 80%, Points required for next Level: 20
    derksheng's Avatar
    Posts
    247
    Thanks
    49
    Thanked 35 Times in 28 Posts

    (OLS) How to get sample variance-covariance matrix of residuals?




    Consider the OLS:

    (1) y = a + b*x + e

    Where e is the error term. I understand that the population variance-covariance matrix for the residuals is ee', but for the sample var-covar matrix do I need to do any d.f. adjustments?

  2. #2
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: (OLS) How to get sample variance-covariance matrix of residuals?

    Are you assuming the covariance matrix looks like \sigma^2 I_{nxn} (ie the observations have constant variance and are independent)?

    If so and if you only have an intercept and a slope and you're using the residuals as your stand in for the errors (so instead of e_i you use r_i = y_i - (a + b*x_i)) it is typical to use \hat{\sigma}^2 = r'r/(n-2) = \frac{1}{n-2}\sum_{i=1}^nr_i^2

    Also note that to get the population covariance matrix you actually need E[ee'].
    I don't have emotions and sometimes that makes me very sad.

  3. The Following User Says Thank You to Dason For This Useful Post:

    derksheng (07-16-2012)

  4. #3
    Points: 1,980, Level: 26
    Level completed: 80%, Points required for next Level: 20
    derksheng's Avatar
    Posts
    247
    Thanks
    49
    Thanked 35 Times in 28 Posts

    Re: (OLS) How to get sample variance-covariance matrix of residuals?

    Very informative post. Thanks for that.

    I'm actually working with heteroscedasticity and serial correlation.

  5. #4
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: (OLS) How to get sample variance-covariance matrix of residuals?

    Are there a few parameters in the proposed covariance matrix? It's not really possible to just estimate the covariance matrix in general without more information.
    I don't have emotions and sometimes that makes me very sad.

  6. #5
    Points: 1,980, Level: 26
    Level completed: 80%, Points required for next Level: 20
    derksheng's Avatar
    Posts
    247
    Thanks
    49
    Thanked 35 Times in 28 Posts

    Re: (OLS) How to get sample variance-covariance matrix of residuals?

    I wasn't aware that it wasn't straight forward. I have the cross-sectional (1) \gamma_i = F \beta + \epsilon. Both gamma and epsilon are stochastic.

    F is a matrix of factors (the first column is 1, for the intercept).

    Using "Portfolio Weighted Least Squares" from Chandra and Balachandran (1992)*, we have \beta = w^T \gamma and Cov(\beta) = w^T S w, where S is the estimated variance-covariance matrix computed from (1) using \epsilon (but the authors don't provide details). w^T = (F^T D^{-1} F)^{-1} F^T D^{-1}.
    D is the diagonal of S

    So I'll need the var-covar of (1) to estimate this regression.


    *More Powerful Portfolio Approaches to Regressing Abnormal Returns on Firm-SpecificVariables for Cross-Sectional
    http://www.jstor.org/discover/10.230...id=56310633793
    Last edited by derksheng; 07-16-2012 at 10:04 AM.

  7. #6
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: (OLS) How to get sample variance-covariance matrix of residuals?

    I'm not on campus right now and can't access that article otherwise I'd take a look at it.
    I don't have emotions and sometimes that makes me very sad.

  8. #7
    Points: 1,980, Level: 26
    Level completed: 80%, Points required for next Level: 20
    derksheng's Avatar
    Posts
    247
    Thanks
    49
    Thanked 35 Times in 28 Posts

    Re: (OLS) How to get sample variance-covariance matrix of residuals?


    Oh thanks for your help.

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats