Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3
Default R-squared from a trendline

What is the difference between (1) the R-squared value generated when you add
a linear trendline on a chart and (2) the R-squared value generated when you
do regression in the Data Analysis add-in?
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 837
Default R-squared from a trendline

Not enough information. What kind of chart?

If the chart is an "XY (Scatter)" chart, then mathematically there is no
difference between the R-squared calculated by linear chart trendline, the
ATP Regression tool, LINEST (fitting a straight line) or the RSQ worksheet
function. Numerically, there may be a difference in Excel versions prior to
2003 because the algorithms used by ATP, LINEST, and RSQ did not use the
available numeric accuracy as efficiently as did the chart trendline.

If the chart is a "Line" chart, then both the R-squared and the trendline
estimated by the chart assume that predictor (x) values are 1,2,3,... even if
you specified different values.

Jerry

"r505el" wrote:

What is the difference between (1) the R-squared value generated when you add
a linear trendline on a chart and (2) the R-squared value generated when you
do regression in the Data Analysis add-in?

  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3
Default R-squared from a trendline

Thanks for responding.

I plotted an XY scatter chart, setting the intercept to 0 and displaying the
R-squared value. I was surprised to see that the R-squared value I obtained
from SAS was different. So I went back to Excel, did "Regression" under Tools
Data Analysis, set the intercept to 0 also, and the R-squared value was the

same as the value I obtained from SAS.

I thought that maybe there was something wrong with my data, so I made up
some X and Y values and did the same comparison. And indeed, both methods in
Excel give different values.

r505el


"Jerry W. Lewis" wrote:

Not enough information. What kind of chart?

If the chart is an "XY (Scatter)" chart, then mathematically there is no
difference between the R-squared calculated by linear chart trendline, the
ATP Regression tool, LINEST (fitting a straight line) or the RSQ worksheet
function. Numerically, there may be a difference in Excel versions prior to
2003 because the algorithms used by ATP, LINEST, and RSQ did not use the
available numeric accuracy as efficiently as did the chart trendline.

If the chart is a "Line" chart, then both the R-squared and the trendline
estimated by the chart assume that predictor (x) values are 1,2,3,... even if
you specified different values.

Jerry

"r505el" wrote:

What is the difference between (1) the R-squared value generated when you add
a linear trendline on a chart and (2) the R-squared value generated when you
do regression in the Data Analysis add-in?

  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 837
Default R-squared from a trendline

You neglected to mention that you were forcing the intercept to zero. That
has been a known issue with Excel for years. LINEST in 2003 (& therefore
ATP) fixed R-square, but the chart platform did not. The ATP "Adjusted
R-square" is still wrong also.

NIST gives data and certified 15-figure results for this type of calculation
http://www.itl.nist.gov/div898/strd/...ATA/NoInt1.dat
http://www.itl.nist.gov/div898/strd/...ATA/NoInt2.dat

Jerry

"r505el" wrote:

Thanks for responding.

I plotted an XY scatter chart, setting the intercept to 0 and displaying the
R-squared value. I was surprised to see that the R-squared value I obtained
from SAS was different. So I went back to Excel, did "Regression" under Tools
Data Analysis, set the intercept to 0 also, and the R-squared value was the

same as the value I obtained from SAS.

I thought that maybe there was something wrong with my data, so I made up
some X and Y values and did the same comparison. And indeed, both methods in
Excel give different values.

r505el


"Jerry W. Lewis" wrote:

Not enough information. What kind of chart?

If the chart is an "XY (Scatter)" chart, then mathematically there is no
difference between the R-squared calculated by linear chart trendline, the
ATP Regression tool, LINEST (fitting a straight line) or the RSQ worksheet
function. Numerically, there may be a difference in Excel versions prior to
2003 because the algorithms used by ATP, LINEST, and RSQ did not use the
available numeric accuracy as efficiently as did the chart trendline.

If the chart is a "Line" chart, then both the R-squared and the trendline
estimated by the chart assume that predictor (x) values are 1,2,3,... even if
you specified different values.

Jerry

"r505el" wrote:

What is the difference between (1) the R-squared value generated when you add
a linear trendline on a chart and (2) the R-squared value generated when you
do regression in the Data Analysis add-in?

  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3
Default R-squared from a trendline

Okay, everything makes sense now. I wouldn't have known that the R-square on
the chart trendline was wrong (when intercept was forced to zero). But yes,
thank you very much.

r505el


"Jerry W. Lewis" wrote:

You neglected to mention that you were forcing the intercept to zero. That
has been a known issue with Excel for years. LINEST in 2003 (& therefore
ATP) fixed R-square, but the chart platform did not. The ATP "Adjusted
R-square" is still wrong also.

NIST gives data and certified 15-figure results for this type of calculation
http://www.itl.nist.gov/div898/strd/...ATA/NoInt1.dat
http://www.itl.nist.gov/div898/strd/...ATA/NoInt2.dat

Jerry

"r505el" wrote:

Thanks for responding.

I plotted an XY scatter chart, setting the intercept to 0 and displaying the
R-squared value. I was surprised to see that the R-squared value I obtained
from SAS was different. So I went back to Excel, did "Regression" under Tools
Data Analysis, set the intercept to 0 also, and the R-squared value was the

same as the value I obtained from SAS.

I thought that maybe there was something wrong with my data, so I made up
some X and Y values and did the same comparison. And indeed, both methods in
Excel give different values.

r505el


"Jerry W. Lewis" wrote:

Not enough information. What kind of chart?

If the chart is an "XY (Scatter)" chart, then mathematically there is no
difference between the R-squared calculated by linear chart trendline, the
ATP Regression tool, LINEST (fitting a straight line) or the RSQ worksheet
function. Numerically, there may be a difference in Excel versions prior to
2003 because the algorithms used by ATP, LINEST, and RSQ did not use the
available numeric accuracy as efficiently as did the chart trendline.

If the chart is a "Line" chart, then both the R-squared and the trendline
estimated by the chart assume that predictor (x) values are 1,2,3,... even if
you specified different values.

Jerry

"r505el" wrote:

What is the difference between (1) the R-squared value generated when you add
a linear trendline on a chart and (2) the R-squared value generated when you
do regression in the Data Analysis add-in?



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
Trendline Equation bastien86 Excel Worksheet Functions 5 July 8th 06 03:19 AM
Trendline in pivot table girth69 Excel Discussion (Misc queries) 0 May 19th 06 10:03 AM
Trendline Extract Phil Hageman Charts and Charting in Excel 5 July 6th 05 02:27 AM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
How do I get the trendline equation from Excel to script? Mattias Charts and Charting in Excel 1 December 7th 04 12:21 PM


All times are GMT +1. The time now is 09:51 AM.

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"