| Statistics Toolbox | Search  Help Desk |
| regstats | See Also |
Regression diagnostics graphical user interface.
Syntax
regstats(responses,DATA) regstats(responses,DATA,'model')
Description
regstats(responses,DATA) generates regression diagnostics for a linear additive model with a constant term. The dependent variable is the vector, responses. Values of the independent variables are in the matrix, DATA.
The function creates a figure with a group of checkboxes that save diagnostic statistics to the base workspace using variable names you can specify.
regstats(responses,data,'model') controls the order of the regression model. 'model' can be one of these strings:
'interaction' - includes constant, linear, and cross product terms.
'quadratic' - interactions plus squared terms.
purequadratic' - includes constant, linear and squared terms.
regstats provides these diagnostics:
regstats window. This displays a hypertext help that gives formulae and interpretations for each of these regression diagnostics.
Algorithm
The usual regression model is: y = X
+
is an p by 1 vector of parameters.
is an n by 1 vector of random disturbances.
X = Q*R where Q and R come from a QR Decomposition of X. Q is orthogonal and R is triangular. Both of these matrices are useful for calculating many regression diagnostics (Goodall 1993).
The standard textbook equation for the least squares estimator of
is:
However, this definition has poor numeric properties. Particularly dubious is the computation of
, which is both expensive and imprecise.
Numerically stable MATLAB code for
is: b = R\(Q'*y);
Reference
Goodall, C. R. (1993). Computation using the QR decomposition. Handbook in Statistics, Volume 9. Statistical Computing (C. R. Rao, ed.). Amsterdam, NL Elsevier/North-Holland.See Also
leverage, stepwise, regress