MATHEMATICA COMPATIBILITY INFORMATION

Upgrading from:

Statistics`LinearRegression`

All functionality from 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:

Version 5.2 << Statistics`LinearRegression`;
Regress[{{1, 2}, {3, 5}, {4, 9}}, {x}, {x}]
In[23]:=
Click for copyable input
Out[23]=

The result is returned as a FittedModel object, of which properties can be returned:

In[24]:=
Click for copyable input
Out[24]=

For a list of available properties, use :

Version 5.2 << Statistics`LinearRegression`;
RegressionReportValues
In[25]:=
Click for copyable input
Out[25]=

To get the functional form of the FittedModel object, use Normal:

In[26]:=
Click for copyable input
Out[26]=

DesignedRegress has also been superseded by LinearModelFit:

Version 5.2 << Statistics`LinearRegression`;
DesignedRegress[{{1, 0}, {1, 1}, {1, 2}}, {1, 2, 4}]
In[2]:=
Click for copyable input
Out[2]=

Calculate the parameter table and property values:

In[3]:=
Click for copyable input
Out[3]=

DesignMatrix is part of the built-in Mathematica kernel:

Version 5.2 << Statistics`LinearRegression`;
DesignMatrix[{2, 3, 4, 6}, x, x]
In[2]:=
Click for copyable input
Out[2]=

BasisNames is now an optional argument to LinearModelFit:

Version 5.2 << Statistics`LinearRegression`;
DesignedRegress[{{1, 1}, {1, 2}, {1, 3}, {1, 4}}, {2, 3, 4, 6}, 
 BasisNames -> {"b1", "b2"}]
In[2]:=
Click for copyable input
Out[2]=

IncludeConstant has been renamed to IncludeConstantBasis:

Version 5.2 << Statistics`LinearRegression`;
DesignMatrix[{1, 2, 3, 4}, {x}, x, IncludeConstant -> False]
In[2]:=
Click for copyable input
Out[2]=

Some of the properties previously available to Regress and related functions have been renamed:

RegressLinearModelFit
BestFitParametersDelta"BetaDifferences"
CookD"CookDistances"
CovarianceMatrixDetRatio"CovarianceRatios"
JackknifedVariance"SingleDeletionVariances"
MeanPredictionCITable"MeanPredictionConfidenceIntervalTable"
ParameterCITable"ParameterConfidenceIntervalTable"
PredictedResponseDelta"FitDifferences"
SinglePredictionCITable"SinglePredictionConfidenceIntervalTable"
SummaryReport{"ParameterTable", "RSquared", "AdjustedRSquared", "EstimatedVariance", "ANOVATable"}
VarianceInflation"VarianceInflationFactors"

New to Mathematica? Find your learning path »
Have a question? Ask support »