WOLFRAM

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

Details

  • 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.

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Define some data:

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

Out[2]=2

See the functional form:

Out[3]=3

Treat all variables as nominal:

Out[4]=4

Scope  (2)Survey of the scope of standard use cases

Automatically select nominal variables:

Out[1]=1
Out[2]=2

Specify nominal variables in GeneralizedLinearModelFit:

Out[1]=1

With LogitModelFit:

Out[2]=2

With ProbitModelFit:

Out[3]=3

Applications  (3)Sample problems that can be solved with this function

Fit a oneway ANOVA model:

Out[2]=2

Obtain the ANOVA table:

Out[3]=3

Compute the model estimates for the three groups:

Out[4]=4

Fit a twoway ANOVA model with interaction term:

Out[2]=2

Obtain the ANOVA table:

Out[3]=3

Compute estimates for each cell:

Out[4]=4

Results in a table:

Out[5]=5

Fit an ANCOVA model:

Out[2]=2

Visualize curves for the three x categories and label using Tooltip:

Out[3]=3
Wolfram Research (2008), NominalVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/NominalVariables.html (updated 2014).
Wolfram Research (2008), NominalVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/NominalVariables.html (updated 2014).

Text

Wolfram Research (2008), NominalVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/NominalVariables.html (updated 2014).

Wolfram Research (2008), NominalVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/NominalVariables.html (updated 2014).

CMS

Wolfram Language. 2008. "NominalVariables." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/NominalVariables.html.

Wolfram Language. 2008. "NominalVariables." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/NominalVariables.html.

APA

Wolfram Language. (2008). NominalVariables. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NominalVariables.html

Wolfram Language. (2008). NominalVariables. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NominalVariables.html

BibTeX

@misc{reference.wolfram_2025_nominalvariables, author="Wolfram Research", title="{NominalVariables}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/NominalVariables.html}", note=[Accessed: 30-April-2025 ]}

@misc{reference.wolfram_2025_nominalvariables, author="Wolfram Research", title="{NominalVariables}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/NominalVariables.html}", note=[Accessed: 30-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_nominalvariables, organization={Wolfram Research}, title={NominalVariables}, year={2014}, url={https://reference.wolfram.com/language/ref/NominalVariables.html}, note=[Accessed: 30-April-2025 ]}

@online{reference.wolfram_2025_nominalvariables, organization={Wolfram Research}, title={NominalVariables}, year={2014}, url={https://reference.wolfram.com/language/ref/NominalVariables.html}, note=[Accessed: 30-April-2025 ]}