Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

rsquared

Format: rsquared( [x1,x2,...], y, zero )

Arguments: [real] [x1,x2] Lists of independent values

[real] y List of dependent values

(bool) zero Optional zero y-intercept; default = no

Returns: (real) Unadjusted R-squared (value between 0 and 1)

Description: R-squared is a measure of how well a least-squares regression line fits a set of input data points. A value of 1 implies a perfect fit while 0 means that there is no correlation between the x- and y-values. Expressed a different way, R-squared is the percent of variance in the dependent values y that can be explained by the independent values x1, x2, ...

Rsquared is designed to be used in conjunction with linefit.

Examples: Fit a line of the form y(x)=b+m*x to the data points:

  (1,7), (3,15), (4,14), (7,20), and (8,30).

and calculate the R-squared measure of fit.

x:=[1,3,4,7,8]

y:=[7,15,14,20,30]

rsquared(x,y) = 0.884


This result means that 88.4% of the variance in y is explained by y(x).

See Also: linefit, stderror, correlation

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend