
Extract ordinal-probit cutpoints from a gllvmTMB_multi fit
Source: R/extract-cutpoints.R
extract_cutpoints.RdFor traits fitted with ordinal_probit(), returns a tidy data frame
with the K - 2 estimated cutpoints \(\tau_2, \ldots, \tau_{K-1}\)
per trait, with optional standard errors from the joint sdreport.
Arguments
- fit
A
gllvmTMB_multifit produced with at least oneordinal_probit()trait.
Value
A data frame with columns
traitTrait label (factor level from
data[[trait]]).cutpoint_indexInteger index \(k \in \{2, \ldots, K-1\}\).
cutpoint_labelCharacter label
"cutpoint_<k>".tau_estimateEstimated \(\tau_k\) on the latent (probit) scale.
tau_seStandard error from the joint sdreport, or
NAif the report is unavailable.
If the fit contains no ordinal_probit() traits, returns a
zero-row data frame with the same columns.
Details
Convention: gllvmTMB follows Hadfield (2015) — \(\tau_1 = 0\) is
fixed for identifiability and the K - 2 free cutpoints are reported
as cutpoint_2, cutpoint_3, etc. This differs from brms, which
reports K - 1 cutpoints as Intercept[1..K-1].
References
Hadfield, J. D. (2015). Increasing the efficiency of MCMC for hierarchical phylogenetic models of categorical traits using reduced mixed models. Methods Ecol. Evol. 6:706-714. doi:10.1111/2041-210X.12354
See also
ordinal_probit() for the family constructor and the
threshold-trait theory reference list.
Examples
if (FALSE) { # \dontrun{
fit <- gllvmTMB(
value ~ 0 + trait + phylo_unique(species, tree = tree),
data = ordinal_dat, unit = "individual", cluster = "species",
family = ordinal_probit()
)
extract_cutpoints(fit)
} # }