Skip to contents

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

Usage

extract_cutpoints(fit)

Arguments

fit

A fit returned by gllvmTMB() with at least one ordinal_probit() trait.

Value

A data frame with columns

trait

Trait label (factor level from data[[trait]]).

cutpoint_index

Integer index \(k \in \{2, \ldots, K-1\}\).

cutpoint_label

Character label "cutpoint_<k>".

tau_estimate

Estimated \(\tau_k\) on the latent (probit) scale.

tau_se

Standard error from the joint sdreport, or NA if 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_indep(species, tree = tree),
  data    = ordinal_dat,
  trait   = "trait",
  unit    = "individual",
  cluster = "species",
  family  = ordinal_probit()
)
extract_cutpoints(fit)
} # }