All functionality from Statistics`LinearRegression` is available in the built-in Mathematica kernel.
New system functions
Regress has been superseded by LinearModelFit, which is part of the built-in Mathematica kernel:
lm = LinearModelFit[{{1, 2}, {3, 5}, {4, 9}}, {x}, {x}]The result is returned as a FittedModel object, of which properties can be returned:
lm[{"ParameterTable", "RSquared"}]For a list of available properties, use "Properties":
lm["Properties"]To get the functional form of the FittedModel object, use Normal:
Normal[lm]DesignedRegress has also been superseded by LinearModelFit:
lm = LinearModelFit[{{{1, 0}, {1, 1}, {1, 2}}, {1, 2, 4}}]Calculate the parameter table and
property values:
lm[{"ParameterTable", "RSquared"}]DesignMatrix is part of the built-in Mathematica kernel:
DesignMatrix[{2, 3, 4, 6}, x, x]BasisNames is now an optional argument to LinearModelFit:
LinearModelFit[{{{1, 1}, {1, 2}, {1, 3}, {1, 4}}, {2, 3, 4, 6}}, {"b1", "b2"}]IncludeConstant has been renamed to IncludeConstantBasis:
DesignMatrix[{1, 2, 3, 4}, {x}, x, IncludeConstantBasis -> False]Some of the properties previously available to Regress and related functions have been renamed:
| Regress | LinearModelFit |
| BestFitParametersDelta | "BetaDifferences" |
| CookD | "CookDistances" |
| CovarianceMatrixDetRatio | "CovarianceRatios" |
| JackknifedVariance | "SingleDeletionVariances" |
| MeanPredictionCITable | "MeanPredictionConfidenceIntervalTable" |
| ParameterCITable | "ParameterConfidenceIntervalTable" |
| PredictedResponseDelta | "FitDifferences" |
| SinglePredictionCITable | "SinglePredictionConfidenceIntervalTable" |
| SummaryReport | {"ParameterTable", "RSquared", "AdjustedRSquared", "EstimatedVariance", "ANOVATable"} |
| VarianceInflation | "VarianceInflationFactors" |