Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Will
 
Posts: n/a
Default Generalised version of LINEST using QR Decomposition

Does anyone know if a generalised version of the Excel 2003 LINEST function
using QR decomposition is available, beyond that posted in the knowledge base
article(http://support.microsoft.com/kb/828533)? That shows the way in which
this can be done with 2 regressors but not for n regressors and I need to
know how this can be extended. Ideally, I think this should be available as a
free bug fix in Excel, as Microsoft has acknowledged that this is a bug.
Also, the Knowledge Base article doesn't show how the standard error of each
coefficient can be determined, hence it's impossible to derive the t-stats
for each coefficient.
  #2   Report Post  
Harlan Grove
 
Posts: n/a
Default

Will wrote...
Does anyone know if a generalised version of the Excel 2003 LINEST function
using QR decomposition is available, beyond that posted in the knowledge base
article(http://support.microsoft.com/kb/828533)? That shows the way in which
this can be done with 2 regressors but not for n regressors and I need to
know how this can be extended. Ideally, I think this should be available as a
free bug fix in Excel, as Microsoft has acknowledged that this is a bug.
Also, the Knowledge Base article doesn't show how the standard error of each
coefficient can be determined, hence it's impossible to derive the t-stats
for each coefficient.


It's fixed in the sense that if it's really important to you, you can
upgrade to Excel 2003 (or 2004 for Macs). There's not going to be a
free fix for earlier versions of Excel.

As for the QR decomposition, it's an explanation of how it works. From
skimming it, it could be extended to more than two independent (X)
variables *if* you know the underlying linear algebraic equations. If
you don't, you shouldn't be messing with this.

  #3   Report Post  
Will
 
Posts: n/a
Default

Thanks Harlan, but the biggest problem is that I work at a firm where any
rollout of new software is done on a corporate-wide basis and takes several
years to occur. If I could take the upgrade path then I would, but this isn't
available to me for several years.

With regards to the given solution, some steps are unclear, for example, why
a column of 1s is added and why the columns are switched around, hence the
explanation is not sufficiently clear in order to generalise. I am trying to
generate an Excel-based solution for some econometrics tests (specifically,
the Augmented Dickey-Fuller test which is specifically designed to account
for correlations in the lagged variables, and hence is guaranteed to generate
problems with multi-collinearity) and I would rather not be forced down the
route of switching to using Matlab instead of Excel.
  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

Will wrote...
....
With regards to the given solution, some steps are unclear, for example, why
a column of 1s is added and why the columns are switched around, hence the
explanation is not sufficiently clear in order to generalise. . . .


Let me try again. The explanation is clear to anyone who knows the
linear algebraic form of the least squares and maximum likelihood
estimators and how to implement them brute force in Excel. It can be
generalized, but you'd need to be very familiar with Excel array
formulas and matrix arithmetic functions. I'm not deliberately trying
to be derogatory (some would say it just comes naturally, but I
digress), but if you don't see how to generalize the approach in the
Microsoft KnowledgeBase, then you wouldn't be likely to be able to spot
problems in an Excel implementation of QR decomposition.

You may need a fully constructed workbook implementation of QR
decomposition. I'm not aware of any available on the web, but others
may.

. . . I am trying to
generate an Excel-based solution for some econometrics tests (specifically,
the Augmented Dickey-Fuller test which is specifically designed to account
for correlations in the lagged variables, and hence is guaranteed to generate
problems with multi-collinearity) and I would rather not be forced down the
route of switching to using Matlab instead of Excel.


You shouldn't be using Excel for this. Even Excel 2003 has its
weaknesses, and rolling your own QR decomposition template would result
in a less efficient and less robust (in the software sense, not the
statistical sense) tool than most dedicated stats packages.

There are much cheaper alternatives than MATLAB. There are addon
packages for R and gretl that calculate augmented Dickey-Fuller tests,
and both R and gretl are GNU software packages. There may also be time
series add-ins for Excel that provide this test and cost less than
MATLAB. Dunno.

  #5   Report Post  
Will
 
Posts: n/a
Default

"Harlan Grove" wrote:

Will wrote...
....
With regards to the given solution, some steps are unclear, for example, why
a column of 1s is added and why the columns are switched around, hence the
explanation is not sufficiently clear in order to generalise. . . .


Let me try again. The explanation is clear to anyone who knows the
linear algebraic form of the least squares and maximum likelihood
estimators and how to implement them brute force in Excel. It can be
generalized, but you'd need to be very familiar with Excel array
formulas and matrix arithmetic functions. I'm not deliberately trying
to be derogatory (some would say it just comes naturally, but I
digress), but if you don't see how to generalize the approach in the
Microsoft KnowledgeBase, then you wouldn't be likely to be able to spot
problems in an Excel implementation of QR decomposition.


To answer my own question above, the reason for the column of 1s in the
knowledge base article is that the regression using QR decomposition is of
the form Rx = Q[T]b, so the regression is fitting a coefficient to a unit
value, which is equivalent to solving for the constant term based on the
usual construction of y=ax + b. A better description of what's going on
(which would have made the knowledge base article far more useful and
understandable) is available at
http://en.wikipedia.org/wiki/Linear_least_squares

You may need a fully constructed workbook implementation of QR
decomposition. I'm not aware of any available on the web, but others
may.

. . . I am trying to
generate an Excel-based solution for some econometrics tests (specifically,
the Augmented Dickey-Fuller test which is specifically designed to account
for correlations in the lagged variables, and hence is guaranteed to generate
problems with multi-collinearity) and I would rather not be forced down the
route of switching to using Matlab instead of Excel.


You shouldn't be using Excel for this. Even Excel 2003 has its
weaknesses, and rolling your own QR decomposition template would result
in a less efficient and less robust (in the software sense, not the
statistical sense) tool than most dedicated stats packages.

There are much cheaper alternatives than MATLAB. There are addon
packages for R and gretl that calculate augmented Dickey-Fuller tests,
and both R and gretl are GNU software packages. There may also be time
series add-ins for Excel that provide this test and cost less than
MATLAB. Dunno.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recover earlier version of excel sheet after new version saved? stephanie38 Excel Discussion (Misc queries) 3 June 17th 05 03:52 AM
How to use later version Excel file in 4.0a? ajimmo Excel Discussion (Misc queries) 1 May 30th 05 10:26 AM
How can I update the version of Excel 2000 9.0 to version 10.0 Ramsey Can Excel Discussion (Misc queries) 1 May 11th 05 03:28 PM
How to use linest with variably sized data arrays? [email protected] Excel Worksheet Functions 0 April 13th 05 04:56 PM
LINEST bug with cubic polynomials in Excel 2003 byundt Excel Worksheet Functions 3 March 21st 05 02:15 PM


All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"