NominalVariables

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

DetailsDetails

  • Possible settings for NominalVariables include:
  • Automaticautomaticaly detect nominal variables
    Alltreat all variables as nominal
    Nonetreat no variables as nominal
    {v1,v2,}treat the variables vi as nominal
  • When NominalVariables->Automatic, different methods are used to detect nominal variables. In functions returning FittedModel[], variables with non-numeric data values are treated as nominal.
  • In linear models, a nominal variable v with possible values s1, s2, is represented as a collection of variables with values 1 or 0 corresponding to each case v==si.

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]=
Introduced in 2008
(7.0)
Translate this page: