Polychoric correlation: what lies beneath a rating scale
Treating Likert items as numbers understates their relationship. Polychoric correlation estimates the correlation of the continuous traits behind them.
What runs in CodeSplash
- Polychoric / polyserial correlation (ordinal variables) Verified in Python and R
You will be able to
- Explain the latent-variable idea behind polychoric correlation
- Compare polychoric with Pearson on the same ordinal items
- Check the bivariate normality test and zero cells before trusting it
- Use polyserial when one variable is continuous
Five boxes hide a continuum
ReadA survey asks how satisfied you are, from "Strongly disagree" to "Strongly agree". Your actual satisfaction isn't one of five values. The scale chops a continuous feeling into categories at some thresholds.
The polychoric correlationPolychoric correlationThe correlation between the normal traits assumed to lie behind two sets of ordered categories. assumes that each item is a cut version of a normally distributed latent trait, then estimates the correlation between those two latent traits.
The model
ReadEach observed item comes from a latent and thresholds :
The two-step estimator takes thresholds from each item's marginal counts, then finds the that makes the table most likely. Full maximum likelihood estimates thresholds and together.
Predict the direction
PredictPredict first
Satisfaction and usage are both ordinal. You compute Pearson's r on the item codes (1, 2, 3 …) and also the polychoric correlation. Which is larger in absolute value?
Reveal
Pearson on codes gives 0.467. The polychoric correlation gives 0.511, 95% CI 0.41 to 0.60. Coarse categories attenuate Pearson's r; polychoric corrects for that, if its model holds.
Check the normality assumption
ReadThe model is strong: normal latent traits. CodeSplash tests it by comparing the observed table with the table the fitted model predicts.
Here (11) = 6.12, and the test gives p = 0.86, so the data show no sign of trouble. A small p-value there means the single is a poor summary of the table.
Watch zero cells as well. This table has 1. Many empty cells make the estimate unstable and can push it toward ±1.
Read the card
In the apppolychoric r = .51, 95% CI [.41, .60], χ²(1) = 70.92, p < .001, N = 298
- ρ
- 0.5108
- 95% CI
- [0.4141, 0.5960]
- SE
- 0.0464
- LR χ²(1)
- 70.917
- p
- < .001
- n
- 298
Effect size
- polychoric ρ 0.5108 95% CI [0.4141, 0.5960]
Assumptions
- Underlying bivariate normality — G²(11) = 6.12, p = 0.865: the fitted cell probabilities match the table.
Estimated thresholds (normal scale)
| Variable | Between | Threshold |
|---|---|---|
| satisfaction | Strongly disagree | Disagree | −1.358 |
| satisfaction | Disagree | Neutral | −0.4062 |
| satisfaction | Neutral | Agree | 0.3253 |
| satisfaction | Agree | Strongly agree | 1.138 |
| usage | Never | Rarely | −0.8610 |
| usage | Rarely | Often | 0.1861 |
| usage | Often | Always | 0.9901 |
- 2 of 300 rows were left out because a value was missing.
- 1 of 20 cells of the table are empty; the estimate may be unstable.
- Polychoric correlation, two-step estimate (Olsson 1979).
The exact R script · R R version 4.5.1 (2025-06-13)
# Polychoric / polyserial correlation (ordinal variables)
# Generated by CodeSplash Analytics 1.0.0 on 2026-11-09 · method correlation.polychoric 1.0.1 · spec 1629055bc54e26c1
# Dataset: f_ordinal (version 1)
# Runs on its own: outside the app, cs_publish() writes $CS_RESULT_PATH or prints the result JSON.
# %% Setup
library(codesplashr)
# %% Data
df <- as.data.frame(nanoparquet::read_parquet("tests/parity/fixtures/f_ordinal.parquet", col_select = c("satisfaction", "usage")))
n_input <- nrow(df)
df[["satisfaction"]] <- factor(df[["satisfaction"]], levels = c("Strongly disagree", "Disagree", "Neutral", "Agree", "Strongly agree")) # stored level order
df[["usage"]] <- factor(df[["usage"]], levels = c("Never", "Rarely", "Often", "Always")) # stored level order
df <- df[stats::complete.cases(df[c("satisfaction", "usage")]), , drop = FALSE] # listwise deletion
df[] <- lapply(df, function(x) if (is.factor(x)) droplevels(x) else x)
n_dropped <- n_input - nrow(df)
warnings <- list()
if (n_dropped > 0) {
warnings <- c(warnings, cs_warning("CS_W_ROWS_DROPPED", dropped = n_dropped, total = n_input))
}
if (n_input > 0 && nrow(df) == 0) cs_error("CS_E_NO_ROWS")
cs_check_finite_columns(df, c("satisfaction", "usage")) # infinite values stop the run (registry/errors.yaml)
# %% Ordinal codes
a <- "satisfaction"
b <- "usage"
x_numeric <- FALSE
y_numeric <- FALSE
x_type <- "auto"
estimator <- "two_step"
x_order <- NULL
y_order <- NULL
conf <- 0.95
ordinal <- function(col, numeric, order, max_levels) {
s <- df[[col]]
if (numeric) {
values <- sort(unique(s), method = "radix")
if (length(values) > max_levels) cs_error("CS_E_TOO_MANY_LEVELS", column = col, k = length(values), max = max_levels)
return(list(codes = match(s, values) - 1L, levels = sprintf("%g", values)))
}
levels <- if (!is.null(order)) as.character(order) else levels(s)
present <- unique(as.character(s))
missing <- setdiff(present, levels)
if (length(missing)) stop(sprintf("The level order for %s leaves out: %s.", col, paste(sort(missing, method = "radix"), collapse = ", ")))
levels <- levels[levels %in% present]
# the same limit as numeric ordinal columns
if (length(levels) > max_levels) cs_error("CS_E_TOO_MANY_LEVELS", column = col, k = length(levels), max = max_levels)
list(codes = match(as.character(s), levels) - 1L, levels = levels)
}
if (x_type == "auto") x_type <- if (x_numeric && length(unique(df[[a]])) > 10) "continuous" else "ordinal"
if (x_type == "continuous" && !x_numeric) stop(sprintf("%s is not numeric, so it cannot be treated as continuous.", a))
oy <- ordinal(b, y_numeric, y_order, 15)
y_codes <- oy$codes; levels_y <- oy$levels
if (length(levels_y) < 2) cs_error("CS_E_CONSTANT", column = b)
n <- nrow(df)
g2 <- NULL; df_bn <- NULL; p_bn <- NULL; n_zero_cells <- 0L
if (x_type == "continuous") {
kind <- "polyserial"
xv <- as.double(df[[a]])
if (length(unique(xv)) < 2) cs_error("CS_E_CONSTANT", column = a)
res <- cs_polyserial(xv, y_codes, length(levels_y), estimator = estimator, conf = conf)
levels_x <- NULL
pearson <- stats::cor(xv, y_codes)
thresholds <- lapply(seq_along(res$thresholds_y), function(i) list(variable = b, between = sprintf("%s | %s", levels_y[i], levels_y[i + 1]), threshold = res$thresholds_y[i]))
} else {
ox <- ordinal(a, x_numeric, x_order, 15)
x_codes <- ox$codes; levels_x <- ox$levels
if (length(levels_x) < 2) cs_error("CS_E_CONSTANT", column = a)
kind <- if (length(levels_x) == 2 && length(levels_y) == 2) "tetrachoric" else "polychoric"
tab <- matrix(0, length(levels_x), length(levels_y))
for (i in seq_along(x_codes)) tab[x_codes[i] + 1L, y_codes[i] + 1L] <- tab[x_codes[i] + 1L, y_codes[i] + 1L] + 1
res <- cs_polychoric(tab, estimator = estimator, conf = conf)
pearson <- stats::cor(x_codes, y_codes)
thresholds <- c(lapply(seq_along(res$thresholds_x), function(i) list(variable = a, between = sprintf("%s | %s", levels_x[i], levels_x[i + 1]), threshold = res$thresholds_x[i])),
lapply(seq_along(res$thresholds_y), function(i) list(variable = b, between = sprintf("%s | %s", levels_y[i], levels_y[i + 1]), threshold = res$thresholds_y[i])))
g2 <- res$g2; df_bn <- res$df_bn; p_bn <- res$p_bn
empty <- sum(tab == 0)
n_zero_cells <- as.integer(empty)
if (empty > 0) warnings <- c(warnings, sprintf("%d of %d cells of the table are empty; the estimate may be unstable.", as.integer(empty), length(tab)))
}
rho <- res$rho; se <- res$se; p <- res$p
# %% Result
alpha <- 1 - conf
pct <- sprintf("%.0f%%", conf * 100)
verdict <- if (p < alpha) sprintf("The underlying variables are correlated (%s).", cs_fmt_p(p)) else sprintf("The data are compatible with no underlying correlation (%s).", cs_fmt_p(p))
summary <- sprintf("The %s correlation between %s and %s was %.2f, %s CI [%.2f, %.2f] (n = %d; Pearson r on the category codes %.2f). %s",
kind, a, b, rho, pct, res$ci_low, res$ci_high, n, pearson, verdict)
apa <- sprintf("%s r = %s, %s CI [%s, %s], χ²(1) = %.2f, %s, N = %d", kind, cs_fmt_num(rho, leading_zero = FALSE), pct,
cs_fmt_num(res$ci_low, leading_zero = FALSE), cs_fmt_num(res$ci_high, leading_zero = FALSE), res$lr, cs_fmt_p(p), n)
bn <- if (kind == "polyserial") {
list(key = "latent_normality", label = "Underlying bivariate normality", status = "info",
detail = "Not testable for a polyserial correlation here; check that the continuous variable looks normal within categories.")
} else if (is.null(df_bn)) {
list(key = "latent_normality", label = "Underlying bivariate normality", status = "info",
detail = "A 2 × 2 table has no degrees of freedom left to test bivariate normality.")
} else {
list(key = "latent_normality", label = "Underlying bivariate normality", status = if (p_bn >= 0.05) "pass" else "warn",
statistic = g2, p = p_bn,
detail = paste0(sprintf("G²(%d) = %.2f, p = %.3f: ", as.integer(df_bn), g2, p_bn),
if (p_bn >= 0.05) "the fitted cell probabilities match the table."
else "the table departs from a discretized bivariate normal; interpret the latent correlation with care."))
}
cs_publish(list(
method = "correlation.polychoric",
methodVersion = "1.0.1",
title = sprintf("%s correlation", paste0(toupper(substring(kind, 1, 1)), substring(kind, 2))),
engine = cs_engine_info("stats", "nanoparquet"),
n = n,
summary = summary,
apa = apa,
statistics = list(
list(key = "rho", label = "ρ", value = rho),
list(key = "ci", label = paste(pct, "CI"), value = c(res$ci_low, res$ci_high)),
list(key = "se", label = "SE", value = se),
list(key = "lr", label = "LR χ²(1)", value = res$lr),
list(key = "p", label = "p", value = p, format = "p"),
list(key = "n", label = "n", value = n)
),
tables = list(list(key = "thresholds", title = "Estimated thresholds (normal scale)", columns = list(
list(key = "variable", label = "Variable", type = "string"), list(key = "between", label = "Between", type = "string"),
list(key = "threshold", label = "Threshold", type = "number")), rows = thresholds)),
effectSizes = list(list(key = "rho", label = paste(kind, "ρ"), value = rho, ciLow = res$ci_low, ciHigh = res$ci_high, ciLevel = conf,
method = "Wald interval on the Fisher z scale")),
assumptions = list(bn),
charts = list(),
warnings = warnings,
notes = list(sprintf("%s correlation, %s estimate (Olsson 1979).", paste0(toupper(substring(kind, 1, 1)), substring(kind, 2)),
if (estimator == "two_step") "two-step" else "full maximum likelihood")),
values = list(type = kind, estimator = estimator, rho = rho, se = se, ci_low = res$ci_low, ci_high = res$ci_high,
lr = res$lr, p = p, g2 = g2, df_bn = df_bn, p_bn = p_bn, n = n, levels_x = levels_x, levels_y = levels_y,
pearson = pearson, n_zero_cells = n_zero_cells)
))
polychoric r = .51, 95% CI [.41, .60], χ²(1) = 70.92, p < .001, N = 298
- ρ
- 0.5108
- 95% CI
- [0.4141, 0.5960]
- SE
- 0.0464
- LR χ²(1)
- 70.917
- p
- < .001
- n
- 298
Effect size
- polychoric ρ 0.5108 95% CI [0.4141, 0.5960]
Assumptions
- Underlying bivariate normality — G²(11) = 6.12, p = 0.865: the fitted cell probabilities match the table.
Estimated thresholds (normal scale)
| Variable | Between | Threshold |
|---|---|---|
| satisfaction | Strongly disagree | Disagree | −1.358 |
| satisfaction | Disagree | Neutral | −0.4062 |
| satisfaction | Neutral | Agree | 0.3253 |
| satisfaction | Agree | Strongly agree | 1.138 |
| usage | Never | Rarely | −0.8610 |
| usage | Rarely | Often | 0.1861 |
| usage | Often | Always | 0.9901 |
- 2 of 300 rows were left out because a value was missing.
- 1 of 20 cells of the table are empty; the estimate may be unstable.
- Polychoric correlation, two-step estimate (Olsson 1979).
The exact Python script · Python Python 3.13.5 · scipy 1.18.1 · pandas 3.1.0
# Polychoric / polyserial correlation (ordinal variables)
# Generated by CodeSplash Analytics 1.0.0 on 2026-11-09 · method correlation.polychoric 1.0.1 · spec 1629055bc54e26c1
# Dataset: f_ordinal (version 1)
# Runs on its own: outside the app, cs.publish() writes $CS_RESULT_PATH or prints the result JSON.
# %% Setup
import numpy as np
import pandas as pd
import codesplash as cs
from codesplash.stats import polychoric
# %% Data
df = pd.read_parquet("tests/parity/fixtures/f_ordinal.parquet", columns=["satisfaction", "usage"])
n_input = len(df)
df["satisfaction"] = pd.Categorical(df["satisfaction"], categories=["Strongly disagree", "Disagree", "Neutral", "Agree", "Strongly agree"]) # stored level order
df["usage"] = pd.Categorical(df["usage"], categories=["Never", "Rarely", "Often", "Always"]) # stored level order
df = df.dropna(subset=["satisfaction", "usage"]) # listwise deletion over the analysis columns
df["satisfaction"] = df["satisfaction"].cat.remove_unused_categories()
df["usage"] = df["usage"].cat.remove_unused_categories()
n_dropped = n_input - len(df)
warnings = []
if n_dropped:
warnings.append(cs.cs_warning("CS_W_ROWS_DROPPED", dropped=n_dropped, total=n_input))
if n_input and not len(df):
cs.cs_error("CS_E_NO_ROWS")
cs.check_finite_columns(df, ["satisfaction", "usage"]) # infinite values stop the run (registry/errors.yaml)
# %% Ordinal codes
a, b = "satisfaction", "usage"
x_numeric = False
y_numeric = False
x_type = "auto"
estimator = "two_step"
x_order = None
y_order = None
conf = 0.95
def ordinal(col, numeric, order, max_levels):
"""Codes 0..K−1 in the given (or stored / numeric) order, observed levels only."""
s = df[col]
if numeric:
values = np.sort(s.unique())
if len(values) > max_levels:
cs.cs_error("CS_E_TOO_MANY_LEVELS", column=col, k=len(values), max=max_levels)
levels = [f"{v:g}" for v in values]
codes = np.searchsorted(values, s.to_numpy())
return codes.astype(int), levels
levels = [str(v) for v in (order if order else list(s.cat.categories))]
present = set(str(v) for v in s.astype(str).unique())
missing = present - set(levels)
if missing:
raise ValueError(f"The level order for {col} leaves out: {', '.join(sorted(missing))}.")
levels = [lv for lv in levels if lv in present]
if len(levels) > max_levels: # the same limit as numeric ordinal columns
cs.cs_error("CS_E_TOO_MANY_LEVELS", column=col, k=len(levels), max=max_levels)
lookup = {lv: i for i, lv in enumerate(levels)}
return s.astype(str).map(lookup).to_numpy(dtype=int), levels
if x_type == "auto":
x_type = "continuous" if x_numeric and df[a].nunique() > 10 else "ordinal"
if x_type == "continuous" and not x_numeric:
raise ValueError(f"{a} is not numeric, so it cannot be treated as continuous.")
y_codes, levels_y = ordinal(b, y_numeric, y_order, 15)
if len(levels_y) < 2:
cs.cs_error("CS_E_CONSTANT", column=b)
n = len(df)
if x_type == "continuous":
kind = "polyserial"
xv = df[a].to_numpy(dtype=float)
if len(np.unique(xv)) < 2:
cs.cs_error("CS_E_CONSTANT", column=a)
res = polychoric.polyserial(xv, y_codes, len(levels_y), estimator=estimator, conf=conf)
levels_x = None
pearson = float(np.corrcoef(xv, y_codes)[0, 1])
thresholds = [{"variable": b, "between": f"{levels_y[i]} | {levels_y[i + 1]}", "threshold": t} for i, t in enumerate(res["thresholds_y"])]
g2 = df_bn = p_bn = None
n_zero_cells = 0
else:
x_codes, levels_x = ordinal(a, x_numeric, x_order, 15)
if len(levels_x) < 2:
cs.cs_error("CS_E_CONSTANT", column=a)
kind = "tetrachoric" if len(levels_x) == 2 and len(levels_y) == 2 else "polychoric"
tab = np.zeros((len(levels_x), len(levels_y)))
np.add.at(tab, (x_codes, y_codes), 1)
res = polychoric.polychoric(tab, estimator=estimator, conf=conf)
pearson = float(np.corrcoef(x_codes, y_codes)[0, 1])
thresholds = ([{"variable": a, "between": f"{levels_x[i]} | {levels_x[i + 1]}", "threshold": t} for i, t in enumerate(res["thresholds_x"])]
+ [{"variable": b, "between": f"{levels_y[i]} | {levels_y[i + 1]}", "threshold": t} for i, t in enumerate(res["thresholds_y"])])
g2, df_bn, p_bn = res["g2"], res["df_bn"], res["p_bn"]
empty = int(np.sum(tab == 0))
n_zero_cells = empty
if empty:
warnings.append(f"{empty} of {tab.size} cells of the table are empty; the estimate may be unstable.")
rho, se, p = res["rho"], res["se"], res["p"]
# %% Result
alpha = 1 - conf
pct = f"{conf:.0%}"
verdict = (f"The underlying variables are correlated ({cs.fmt_p(p)})." if p < alpha
else f"The data are compatible with no underlying correlation ({cs.fmt_p(p)}).")
summary = (f"The {kind} correlation between {a} and {b} was {rho:.2f}, {pct} CI [{res['ci_low']:.2f}, {res['ci_high']:.2f}] "
f"(n = {n}; Pearson r on the category codes {pearson:.2f}). {verdict}")
apa = (f"{kind} r = {cs.fmt_num(rho, leading_zero=False)}, {pct} CI [{cs.fmt_num(res['ci_low'], leading_zero=False)}, "
f"{cs.fmt_num(res['ci_high'], leading_zero=False)}], χ²(1) = {res['lr']:.2f}, {cs.fmt_p(p)}, N = {n}")
if kind == "polyserial":
bn = {"key": "latent_normality", "label": "Underlying bivariate normality", "status": "info",
"detail": "Not testable for a polyserial correlation here; check that the continuous variable looks normal within categories."}
elif df_bn is None:
bn = {"key": "latent_normality", "label": "Underlying bivariate normality", "status": "info",
"detail": "A 2 × 2 table has no degrees of freedom left to test bivariate normality."}
else:
bn = {"key": "latent_normality", "label": "Underlying bivariate normality", "status": "pass" if p_bn >= 0.05 else "warn",
"statistic": g2, "p": p_bn,
"detail": f"G²({df_bn}) = {g2:.2f}, p = {p_bn:.3f}: " + ("the fitted cell probabilities match the table." if p_bn >= 0.05
else "the table departs from a discretized bivariate normal; interpret the latent correlation with care.")}
cs.publish({
"method": "correlation.polychoric",
"methodVersion": "1.0.1",
"title": f"{kind.capitalize()} correlation",
"engine": cs.engine_info("pandas", "numpy", "scipy"),
"n": n,
"summary": summary,
"apa": apa,
"statistics": [
{"key": "rho", "label": "ρ", "value": rho},
{"key": "ci", "label": f"{pct} CI", "value": [res["ci_low"], res["ci_high"]]},
{"key": "se", "label": "SE", "value": se},
{"key": "lr", "label": "LR χ²(1)", "value": res["lr"]},
{"key": "p", "label": "p", "value": p, "format": "p"},
{"key": "n", "label": "n", "value": n},
],
"tables": [{"key": "thresholds", "title": "Estimated thresholds (normal scale)", "columns": [
{"key": "variable", "label": "Variable", "type": "string"}, {"key": "between", "label": "Between", "type": "string"},
{"key": "threshold", "label": "Threshold", "type": "number"}], "rows": thresholds}],
"effectSizes": [{"key": "rho", "label": f"{kind} ρ", "value": rho, "ciLow": res["ci_low"], "ciHigh": res["ci_high"], "ciLevel": conf,
"method": "Wald interval on the Fisher z scale"}],
"assumptions": [bn],
"charts": [],
"warnings": warnings,
"notes": [f"{kind.capitalize()} correlation, {'two-step' if estimator == 'two_step' else 'full maximum likelihood'} estimate (Olsson 1979)."],
"values": {"type": kind, "estimator": estimator, "rho": rho, "se": se, "ci_low": res["ci_low"], "ci_high": res["ci_high"],
"lr": res["lr"], "p": p, "g2": g2, "df_bn": df_bn, "p_bn": p_bn, "n": n, "levels_x": levels_x, "levels_y": levels_y,
"pearson": pearson, "n_zero_cells": n_zero_cells},
})
Set the order of the levels if the app can't infer it from text labels. Reversing one item's order flips the sign and leaves the size unchanged: here it gives −0.511.
Two-step and full ML usually agree closely: here 0.511 and 0.509.
When one variable is continuous
ReadWhen one variable is ordinal and the other continuous, the same idea gives the polyserial correlationPolyserial correlationThe estimated correlation between a numeric variable and a normal trait assumed to lie behind an ordinal one.. Minutes of use per week against satisfaction gives ρ = 0.594, where Pearson's r is 0.568.
With two binary items, polychoric is the same thing as the tetrachoric correlation, and that is the case where the normality assumption is hardest to check.
Which should you report?
ReflectPolychoric answers: "If this scale had measured the underlying traits perfectly, how correlated would they be?" Spearman answers: "How well do these observed ratings agree in order?"
Before a factor analysis of Likert items, polychoric usually fits better. For a plain description of survey responses, Spearman makes fewer assumptions. Which question does your own analysis ask?
Check your understanding
CheckpointCheck yourself
Why is the polychoric correlation usually larger than Pearson's r on the item codes?
Show the answer
Answer: a
Coarsening loses information, which shrinks Pearson's r. Polychoric models the coarsening and estimates the correlation before it.
Check yourself
The bivariate-normality check returns p = .001. What should you do?
Show the answer
Answer: b
A small p-value says the model's table doesn't match the observed one. Rank coefficients don't rely on normal latent traits.
Check yourself
What is the polychoric correlation between two binary items usually called?
Show the answer
Accepted: “tetrachoric”, “tetrachoric correlation”
The tetrachoric correlation.
Do it on your own data
In the appChoose two ordinal or text-labeled columns, then set the level order for each.
import numpy as np
from scipy import optimize, stats
def polychoric_two_step(table):
"""Two-step polychoric correlation from a contingency table of counts."""
t = np.asarray(table, float)
n = t.sum()
a = np.r_[-8, stats.norm.ppf(np.cumsum(t.sum(1))[:-1] / n), 8]
b = np.r_[-8, stats.norm.ppf(np.cumsum(t.sum(0))[:-1] / n), 8]
def nll(rho):
cov = [[1, rho], [rho, 1]]
cdf = lambda x, y: stats.multivariate_normal.cdf([x, y], [0, 0], cov)
ll = 0.0
for i in range(t.shape[0]):
for j in range(t.shape[1]):
p = cdf(a[i + 1], b[j + 1]) - cdf(a[i], b[j + 1]) - cdf(a[i + 1], b[j]) + cdf(a[i], b[j])
ll += t[i, j] * np.log(max(p, 1e-12))
return -ll
return optimize.minimize_scalar(nll, bounds=(-0.999, 0.999), method="bounded").x# install.packages("polycor")
library(polycor)
df <- read.csv("survey.csv")
polychor(ordered(df$satisfaction), ordered(df$usage), std.err = TRUE)Recap
Recap- Polychoric correlation estimates the correlation of continuous traits behind ordinal items.
- It corrects the attenuation that coarse categories cause, but it depends on normal latent traits.
- Check the normality test and zero cells; report a rank coefficient too when the check fails.
- Polyserial handles one continuous and one ordinal variable.