NominalVariables

NominalVariables
is an option for fitting functions such as LinearModelFit that specifies which variables should be treated as having discrete values specified by names.

DetailsDetails

  • Possible settings for NominalVariables include:
  • Automatictreat variables with non-numeric data values as nominal
    Alltreat all variables as nominal
    Nonetreat no variables as nominal
    {v1,v2,...}treat the variables as nominal
  • In linear models, a nominal variable v with possible values , , ... is represented as a collection of variables with values or corresponding to each case .

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Define some data:

In[1]:=
Click for copyable input

Fit the data, treating the first variable as a nominal variable:

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

See the functional form:

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

Treat all variables as nominal:

In[4]:=
Click for copyable input
Out[4]=
New in 7
New to Mathematica? Find your learning path »
Have a question? Ask support »