Phone: +1 (888) 4279486
+1 (312) 2573777
Contact Us
SLR_GOF
Calculates a measure for the goodness of fit (e.g. R^2, LLF^{i}, AIC^{i}).
Syntax
X
is the independent (aka explanatory or predictor) variable data array (one dimensional array of cells (e.g. rows or columns)).
Y
is the response or the dependent variable data array (one dimensional array of cells (e.g. rows or columns)).
Intercept
is the constant or the intercept value to fix (e.g. zero). If missing, an intercept will not be fixed and is computed normally.
Return_type
is a switch to select the return output (1 = RSquare (default), 2 = Adj. RSquare, 3 = RMSE^{i}, 4 = LLF, 5 = AIC, 6 = SIC^{i}/BIC^{i}).
Method  Description 

1  RSquare 
2  Adjusted RSquare 
3  Regression Error 
4  loglikelyhood (LLF) 
5  Akaikeinformation criterion (AIC) 
6  Schwartz/Bayesian Information criterion (SBIC) 
Remarks
 The underlying model is described here.

The coefficient of determination, denoted , provides a measure of how well observed outcomes are replicated by the model.

The adjusted Rsquare (denoted ) is an attempt to take account of the phenomenon of the automatically and spuriously increasing when extra explanatory variables are added to the model. The adjusts for the number of explanatory terms in a model relative to the number of data points.
Where:
 is the number of explanatory variables in the model.
 is the number of observations in the sample.

The regression error is defined as the square root for the mean square error (RMSE):

The log likelihood of the regression is given as:
The Akaike and Schwarz/Bayesian information criterion are given as:
 The sample data may include missing values.
 Each column in the input matrix corresponds to a separate variable.
 Each row in the input matrix corresponds to an observation.
 Observations (i.e. row) with missing values in X or Y are removed.
 The number of rows of the response variable (Y) must be equal to the number of rows of the explanatory variables (X).
 The SLR_GOF function is available starting with version 1.60 APACHE.
Examples
References
 Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0691042896
 Kenney, J. F. and Keeping, E. S. (1962) "Linear Regression and Correlation." Ch. 15 in Mathematics of Statistics, Pt. 1, 3rd ed. Princeton, NJ: Van Nostrand, pp. 252285