Multinomial and ordinal regression models are useful when the outcome has more than two categories. In this tutorial, we show how to fit both types of models in Excel with BESH Stat NG using the GUI workflow and the UDF workflow.
The tutorial uses two real clinical-style examples from biomedical datasets:
- a multinomial logistic regression example with a six-class dermatology diagnosis outcome
- an ordinal logistic regression example with an ordered heart-disease severity outcome coded from 0 to 4
This page follows the same structure as the other BESH Stat NG tutorials:
- real-world example data
- step-by-step GUI workflow
- reproducible worksheet/UDF workflow
- practical interpretation of the output
- downloadable workbook template
Download the example workbook
The workbook contains these sheets:
- README — overview of both examples
- Data_Multinomial — multiclass dermatology example
- MN_Reference — reference multinomial output
- MN_UDF_Workflow — live multinomial UDF workflow
- Data_Ordinal — ordered heart-disease example
- ORD_Reference — reference ordinal output
- ORD_UDF_Workflow — live ordinal UDF workflow
- Sources — dataset and documentation links
When to use multinomial vs ordinal regression
These two model families are related, but they are used for different kinds of outcomes.
Multinomial logistic regression
Use a multinomial model when the response categories are nominal and have no natural order.
Examples:
- disease subtype
- histology class
- treatment group
- diagnostic label
In the workbook, the multinomial example predicts one of six dermatology classes.
Ordinal logistic regression
Use an ordinal model when the response categories are ordered.
Examples:
- disease severity grade
- toxicity grade
- symptom score
- progression stage
In the workbook, the ordinal example predicts heart-disease severity coded from 0 to 4.
Multinomial logistic regression in Excel
Example data
The multinomial workflow uses a dermatology dataset with six outcome classes:
- psoriasis
- seborrheic dermatitis
- lichen planus
- pityriasis rosea
- chronic dermatitis
- pityriasis rubra pilaris
The workbook uses these predictors:
- age
- erythema
- scaling
- itching
- definite borders
This is a good tutorial example because the outcome is clearly multiclass and the predictors are clinically interpretable.
GUI workflow: multinomial logistic regression
Step 1. Open the tool
Go to:
BESH Stat NG → Analyse → Regression → Multinomial Logistic Regression

Step 2. Select the dependent variable and predictors
On the Select Variables tab:
- set the dependent variable to class_code
- move the predictors to the predictor box:
- age
- erythema
- scaling
- itching
- def_borders

Step 3. Build the model
On the Build Model tab, add the selected effects to the model.
In this tutorial, the model uses a simple additive specification with an intercept:
- age
- erythema
- scaling
- itching
- def_borders

Step 4. Set the options
On the Options tab:
- reference category: First
- convergence criterion: 1E-06
- max. IRLS iterations: 150
- alpha: 0.05

Step 5. Fit the model
Click Fit.
The GUI returns:
- coefficient tables for each class contrast
- odds-ratio output
- likelihood-ratio model statistics
- a classification table
Multinomial results for this example
In this workbook, the multinomial model was fit with class 1 as the reference category.
Key model results:
- Observations: 358
- Null log likelihood: -602.6121
- Final log likelihood: -362.3298
- Likelihood-ratio chi-square: 480.5646
- McFadden pseudo R²: 0.3987
- AIC: 784.6595
- BIC: 901.0755
- Training accuracy: 59.78%
This is a meaningful fit for a six-class clinical outcome. The model is clearly better than the null model, and several class-specific coefficients are strongly associated with the diagnostic contrasts.
Examples from the fitted output:
- for class 2 vs class 1, def_borders has a strong negative coefficient, with an odds ratio well below 1
- for class 3 vs class 1, scaling is strongly negative while itching is strongly positive
- the class-specific coefficients differ across contrasts, which is exactly what makes multinomial modeling useful in multiclass diagnosis problems
The classification table also shows that some classes are predicted much more accurately than others, which is typical in multiclass biomedical data. Download the full GUI based excel workbook with results here.
UDF workflow: multinomial logistic regression
The GUI workflow is convenient for interactive analysis, but the UDF workflow is better when you want a reproducible workbook, a template, or a tutorial-ready sheet.
The workbook uses these BESH Stat NG functions:
BESH.REGR.MNLOGIT_FIT(...)BESH.REGR.MNLOGIT_SUMMARY(...)BESH.REGR.MNLOGIT_TESTS(...)BESH.REGR.MNLOGIT_CLASS(...)BESH.REGR.MNLOGIT_PRED(...)
Fit handle formula
=BESH.REGR.MNLOGIT_FIT(Data_Multinomial!$F$8:$F$365,Data_Multinomial!$A$8:$E$365,$B$5,,,$B$7,TRUE,$B$6,"relative",$B$9,$B$10,$B$8)=BESH.REGR.MNLOGIT_SUMMARY($B$12,TRUE,$B$8)=BESH.REGR.MNLOGIT_TESTS($B$12,TRUE)=BESH.REGR.MNLOGIT_CLASS($B$12,TRUE)=BESH.REGR.MNLOGIT_PRED($B$12,B49:F52,,TRUE)Interpreting the multinomial example
The multinomial model answers this question:
How do the predictor patterns differ across multiple diagnosis categories?
In this dermatology example:
- the outcome is nominal rather than ordered
- the fitted coefficients are interpreted relative to a reference class
- each diagnostic class has its own contrast against the baseline
That makes multinomial logistic regression a good fit for multiclass diagnostic workflows where the outcome categories are distinct but not naturally ranked.
Ordinal logistic regression in Excel
Example data
The ordinal workflow uses a heart-disease dataset with an ordered outcome coded as:
- 0
- 1
- 2
- 3
- 4
This makes it a natural example for a proportional-odds / cumulative logit model.
The workbook uses these predictors:
- age
- sex
- chest-pain type (
cp) - maximum heart rate achieved (
thalach) - ST depression induced by exercise (
oldpeak) - exercise-induced angina (
exang)
This is a strong tutorial example because the outcome is ordered and several predictors are clinically meaningful.
GUI workflow: ordinal logistic regression
Step 1. Open the tool
Go to:
BESH Stat NG → Analyse → Regression → Ordinal Logistic Regression
Step 2. Select the dependent variable and predictors
On the Select Variables tab:
- set the dependent variable to outcome_code
- move the predictors to the predictor box:
- age
- sex
- cp
- thalach
- oldpeak
- exang

Step 3. Build the model and define categorical factors
On the Build Model tab:
- keep age, thalach, and oldpeak as continuous predictors
- add sex, cp, and exang as categorical factors

This is important because the worksheet/UDF version uses the same logic through factor(...) terms in the formula text.
Step 4. Set the options
On the Options tab:
- reference category: Last
- convergence criterion: 1E-08
- max. IRLS iterations: 150
- alpha: 0.05

Step 5. Fit the model
Click Fit.
The GUI returns:
- slope estimates
- threshold (cutpoint) estimates
- odds ratios
- likelihood-ratio model statistics
- a classification table
Ordinal results for this example
Key model results:
- Observations: 303
- Null log likelihood: -387.6914
- Final log likelihood: -299.5649
- Likelihood-ratio chi-square: 176.2531
- McFadden pseudo R²: 0.2273
- AIC: 623.1297
- BIC: 667.6945
- Training accuracy: 57.76%
Selected fitted effects:
- age: positive and statistically significant
- sex[1]: positive and statistically significant
- cp[4]: strongly positive and statistically significant
- thalach: negative and statistically significant
- oldpeak: positive and strongly significant
- exang[1]: positive but not statistically significant at the 0.05 level in this fit
The model also reports the cutpoints:
α1: cutpoint for P(Y ≤ 0)α2: cutpoint for P(Y ≤ 1)α3: cutpoint for P(Y ≤ 2)α4: cutpoint for P(Y ≤ 3)
These cutpoints are part of the cumulative logit parameterization and should not be interpreted the same way as slope coefficients. Download the full GUI based excel workbook with results here.
UDF workflow: ordinal logistic regression
The workbook uses the following BESH Stat NG ordinal-regression functions:
BESH.REGR.ORDLOGIT_FIT(...)BESH.REGR.ORDLOGIT_SUMMARY(...)BESH.REGR.ORDLOGIT_TESTS(...)BESH.REGR.ORDLOGIT_CLASS(...)
The workbook also includes a scenario prediction block for BESH.REGR.ORDLOGIT_PRED(...), which is useful for future extensions of the template.
Fit handle formula
=BESH.REGR.ORDLOGIT_FIT(Data_Ordinal!$G$8:$G$310,Data_Ordinal!$A$8:$F$310,$B$5,,,$B$7,$B$6,"relative",$B$9,$B$10,$B$8)A + factor(B, ref=0) + factor(C, ref=1) + D + E + factor(F, ref=0)sexcpexang
are modeled as categorical predictors.
Summary spill
=BESH.REGR.ORDLOGIT_SUMMARY($B$12,TRUE,$B$8)=BESH.REGR.ORDLOGIT_TESTS($B$12,TRUE)=BESH.REGR.ORDLOGIT_CLASS($B$12,TRUE)Validation and reference checking
The multinomial and ordinal workflows shown in this tutorial are designed to be transparent and reproducible. The worksheet outputs can be checked directly against the GUI output and the downloadable workbook. For a broader overview of how BESH Stat NG results are validated, including reference datasets, automated checks, and comparison workflows, see Validation page.
Practical interpretation
These two examples show why it is useful to separate nominal and ordinal outcome workflows.
In the multinomial example
The six diagnosis categories are not naturally ranked. The model therefore estimates a separate set of class contrasts relative to the reference category. This is the right framework for multiclass diagnostic labeling.
In the ordinal example
The heart-disease outcome is ordered from lower to higher severity. The ordinal logistic model uses that ordering and fits a cumulative logit / proportional-odds structure. This gives a more appropriate model than a nominal multiclass fit when the categories have a meaningful progression.
Why use both GUI and UDF workflows?
The two workflows complement each other.
GUI workflow advantages
- easy model setup
- clear access to categorical-factor options
- fast exploratory fitting
- convenient output sheets for review
UDF workflow advantages
- reproducible workbook logic
- easy audit trail
- ideal for templates and tutorials
- direct reuse in scenario analysis and reporting sheets
- easier version control for methodological examples
A good Excel tutorial should usually show both.
Notes and tips
- Use multinomial logistic regression when the outcome categories are nominal.
- Use ordinal logistic regression when the categories are ordered.
- In the ordinal UDF workflow, use
factor(...)for categorical predictors. - Keep the outcome coding consistent between the GUI and worksheet workflows.
- Refit the model after changing the formula text, reference category, or predictor list.
- For workbook-based teaching examples, it is helpful to keep a separate reference sheet and live UDF sheet side by side.
Suggested structure for your own workbook templates
A reusable outcome-model workbook in Excel can follow this pattern:
- Data sheet
Keep the raw outcome and predictors. - Reference sheet
Save a static reference fit for review and documentation. - Live UDF workflow sheet
Use..._FIT,..._SUMMARY,..._TESTS, and..._CLASS. - Prediction or scenario sheet
Add new-case scoring when needed. - Sources sheet
Record dataset and method-documentation links.
This structure is especially helpful for tutorial pages, internal templates, and validation workflows.
Summary
BESH Stat NG makes it possible to fit both multinomial and ordinal outcome models directly in Excel.
In this tutorial:
- the multinomial example models a six-class dermatology diagnosis outcome
- the ordinal example models an ordered heart-disease severity outcome
- both workflows are demonstrated through the GUI and the UDF interfaces
- the workbook provides a reusable template for clinical and biomedical multicategory outcomes
This makes the page a good starting point for users who want to build Excel-based workflows for multiclass and ordered-outcome modeling.
Frequently asked questions
What is the difference between multinomial and ordinal logistic regression?
Multinomial logistic regression is used when the outcome categories are nominal and have no natural order. Ordinal logistic regression is used when the outcome categories are ordered.
Can BESH Stat NG fit multinomial and ordinal models in Excel?
Yes. BESH Stat NG supports both model families through the GUI and through worksheet UDFs.
When should I treat an outcome as ordinal instead of nominal?
Use an ordinal model when the categories represent an ordered progression, such as severity levels, grades, or stages.
Can I use categorical predictors in the ordinal workflow?
Yes. In the GUI, predictors can be added as categorical factors. In the UDF workflow, the same setup is represented with factor(...) terms in the formula argument.
Why is a reference category needed in multinomial regression?
The multinomial model estimates class contrasts relative to a baseline category. The interpretation of the coefficients depends on that reference choice.