Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChasX
 
Posts: n/a
Default Anomolous behaviour of slope function.

Xcel XP. I frequently chart a variable (y) against a continous sequence of
dates(x). I use the resident slope function in xcel to obtain a slope of a
linear regression of the data. I also plot the curve and print-out the
formula for the curve in the form: y=mx+b, where m should equal the same
value as that derived from the resident slope function. This does occur
when I set the x axis(the date component) as "category", in addition when I
do this "b" equals the proper y intercept. When I set the x axis as "time
scale" the y intercept is displayed as an unusually large value and there is
a small discrepancy in the slope(m). Can any one tell me why this
discrepancy occurs.
Thanks
Chas
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MrShorty
 
Posts: n/a
Default Anomolous behaviour of slope function.


Without your data, it's kind of hard to answer real specifically, but I
suspect it has to do with exactly what the regression is using for x.

The large difference in intercept is probably because, as a category
axis, the regression doesn't use the values on the axis, but instead
uses 1,2,3,... for x. As a time value axis, the regression will use
the values on the axis, where the values on the axis will be days since
Jan 1, 1900 (default setting) or Jan 4 1904 (with 1904 date setting
selected). An x of 0 has two very different meanings. As a category
axis, day 0 is the day before the first entry. As a time scale axis,
day 0 is very early in the 20th century depending on which reference
date is selected.

You don't say how large the small discrepancy in the slope is, but it
is often mentioned here that the worksheet functions use a slightly
different algorithm to perform the regression than the chart trendline
function, which could explain the slight difference. There's always
round off error, too, that could come into play.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=519073

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChasX
 
Posts: n/a
Default Anomolous behaviour of slope function.

Thanks MrShorty;
From your explanation it appears that the category function is more
applicable to my work, as I am more interested in the equal spacing of the
values than the dates.
It looks like the chart function uses the spacing of the data on the x-axis
and the worksheet function use the values in the column holding the dates,
which fits your explanation.
Thanks
chas

"MrShorty" wrote:


Without your data, it's kind of hard to answer real specifically, but I
suspect it has to do with exactly what the regression is using for x.

The large difference in intercept is probably because, as a category
axis, the regression doesn't use the values on the axis, but instead
uses 1,2,3,... for x. As a time value axis, the regression will use
the values on the axis, where the values on the axis will be days since
Jan 1, 1900 (default setting) or Jan 4 1904 (with 1904 date setting
selected). An x of 0 has two very different meanings. As a category
axis, day 0 is the day before the first entry. As a time scale axis,
day 0 is very early in the 20th century depending on which reference
date is selected.

You don't say how large the small discrepancy in the slope is, but it
is often mentioned here that the worksheet functions use a slightly
different algorithm to perform the regression than the chart trendline
function, which could explain the slight difference. There's always
round off error, too, that could come into play.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=519073


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
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
"Group" function very slow with Excel 2003 :( ... While very quick with Excel2000 :O) Alain79 Excel Discussion (Misc queries) 4 June 14th 05 07:34 AM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
how can i get the slope function to ignore missing data? Delmar Excel Discussion (Misc queries) 0 December 2nd 04 05:55 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 08:06 PM.

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

About Us

"It's about Microsoft Excel"