IncludeConstantBasis

IncludeConstantBasis
is an option for LinearModelFit and other fitting functions that specifies whether a constant term should be included if not explicitly given in the list of basis functions.

DetailsDetails

  • The default setting IncludeConstantBasis->True adds a constant basis to the model if one is not specified in the list of basis functions.
  • Linear and generalized linear models typically compare the fitted model to the mean response model, which contains only a constant basis function.
  • Setting IncludeConstantBasis->False can be used to fit models without a constant basis function.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Fit a simple linear regression model:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Fit the linear model with intercept zero:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2008
(7.0)