Generalized least squares regression

fezzer

New Member
Joined
Mar 15, 2010
Messages
26
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
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
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 ...
 
Upvote 0
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.
 
Upvote 0
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?
 
Upvote 0
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 :(
 
Upvote 0
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:
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,394
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top