This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

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.
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 .
Define some data:
Fit the data, treating the first variable as a nominal variable:
See the functional form:
Treat all variables as nominal:
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]=
Automatically select nominal variables:
Specify nominal variables in GeneralizedLinearModelFit:
Fit a one-way ANOVA model:
Obtain the ANOVA table:
Compute the model estimates for the three groups:
Fit a two-way ANOVA model with interaction term:
Obtain the ANOVA table:
Compute estimates for each cell:
Results in a table:
Fit an ANCOVA model:
Visualize curves for the three x categories and label using Tooltip:
New in 7