Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Generalized least squares regression

This is a discussion on Generalized least squares regression within the Excel Questions forums, part of the Question Forums category; Is it possible to fit a GLS regression trendline to a graph as opposed to the ordinary least squares(OLS) method ...

  1. #1
    New Member
    Join Date
    Mar 2010
    Location
    Dublin, Ireland
    Posts
    26

    Default Generalized least squares regression

    Is it possible to fit a GLS regression trendline to a graph as opposed to the ordinary least squares(OLS) method provided as standard? I'm just looking to be able to find the slope of a trendline but the data is autocorrelated so OLS trendlines aren't recommended.
    Thanks

  2. #2
    Board Regular
    Join Date
    Nov 2007
    Location
    USA
    Posts
    403

    Default Re: Generalized least squares regression

    You can find info on Autocorrelation and Generalized Least Squares Regression with Excel at:

    Introductory Econometrics Chapter 20: Autocorrelation
    http://www3.wabash.edu/econometrics/EconometricsBook/chap20.htm
    Introductory Econometrics Chapter 20: Autocorrelation

    At bottom of page:
    Excel Workbooks
    AutoCorr.xls
    AutoCorr.xls

  3. #3

    Join Date
    Jan 2003
    Posts
    810

    Default Re: Generalized least squares regression

    If you're looking to the trendline facility on excel charts to do this, then I very much doubt if that will do it.

    If you like, and if you know the autocorrelation coefficients, then it's not hard to transform data in Excel to make your data unautocorrelated, do the OLS regression on the transformed data and then chart it. Alternatively, use one of the many statistical programs around that have GLS procedures built in.

    I don't see that autocorrelation is much of a problem for trendlines on charts, since even autocorrelated OLS still gives unbiased values for your coefficients, unless there are other problems too. Chart trendlines are only visual things so I very much doubt if it would look much different whether you allowed for the autocorrelation in charting or not.

    It's only if you want to use the regression for more accurate purposes such as prediction ...

  4. #4
    New Member
    Join Date
    Mar 2010
    Location
    Dublin, Ireland
    Posts
    26

    Default Re: Generalized least squares regression

    Thanks for the replies guys. My data is mostly uncorrelated, I have a vba program written to test for autocorrelation. I'm batching the data into average points to lessen any existing correlation, however if I'm not mistaken, there will still be heteroskedasticity present in the data. I'm trying to fit an Amemiya GLS line to find the slope of the data points along the way to see when it chages.

  5. #5
    New Member
    Join Date
    Oct 2013
    Posts
    4

    Default Re: Generalized least squares regression

    what easy software can you suggest that can make use of generalized least square method?

  6. #6
    Banned user
    Join Date
    Nov 2010
    Posts
    2,075

    Default Re: Generalized least squares regression

    Quote Originally Posted by STATISTICS View Post
    what easy software can you suggest that can make use of generalized least square method?
    Not much in Excel I'm afraid, although we could if needed look at any particular problem.

    GLS in Excel would work by first pre-transforming the data appropriately (Excel is good at this) then doing standard regression on the transformed data using the LINEST function, the Data Analysis regression or other. There's also one or two ad hoc VBA regressions on this forum somewhere.

    But probably best if you look through Google for pre-written programs, and/or some adequate statistics or econometrics texts, of which there's plenty around.

    Why do you want to use GLS anyway? What sort of problem? The method actually has pretty wide scope of application. Why wouldn't ordinary regression be adequate?

  7. #7
    New Member
    Join Date
    Oct 2013
    Posts
    4

    Default Re: Generalized least squares regression

    I was tasked to create regression equations that was in need of the use of GLS that is why i badly need it huhu. i was searching for it a lot of times but it's kind of difficult to understand. thank you for the reply..

    huhu need help..badly

  8. #8
    Banned user
    Join Date
    Nov 2010
    Posts
    2,075

    Default Re: Generalized least squares regression

    Quote Originally Posted by STATISTICS View Post
    I was tasked to create regression equations that was in need of the use of GLS that is why i badly need it huhu. i was searching for it a lot of times but it's kind of difficult to understand. thank you for the reply..

    huhu need help..badly
    why in need of GLS?
    is this a homework or similar project?
    and what's huhu? do you mean New Zealand's version of the Australian witchetty grub, or is there some other meaning?
    Last edited by mirabeau; Oct 8th, 2013 at 02:54 AM.

  9. #9
    New Member
    Join Date
    Oct 2013
    Posts
    4

    Default Re: Generalized least squares regression

    Quote Originally Posted by mirabeau View Post
    why in need of GLS?
    is this a homework or similar project?
    and what's huhu? do you mean New Zealand's version of the Australian witchetty grub, or is there some other meaning?


    huhu is like crying....

    this is a project..

  10. #10
    Banned user
    Join Date
    Nov 2010
    Posts
    2,075

    Default Re: Generalized least squares regression

    Quote Originally Posted by STATISTICS View Post
    huhu is like crying....

    this is a project..
    there's a VBA coded example of GLS in the below link, applied to weighting different rows of a regression differently (weighted regression).

    this is just one use of GLS as posted on this forum, but I don't know just what you're looking for

    VBA Weighted linear regression?

Page 1 of 2 12 LastLast

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com