clmstan0.1.0 package

Cumulative Link Models with 'CmdStanR'

aep_cdf

Asymmetric Exponential Power (AEP) link CDF

apply_custom_link_priors

Apply custom prior specifications for link parameters

apply_priors_to_stan_data

Apply user priors to Stan data

aranda_ordaz_cdf

Aranda-Ordaz asymmetric link CDF

c.clm_prior_spec

Combine Multiple Prior Specifications

cauchy

Cauchy Distribution for Prior Specification

clm_cdf

Unified CDF dispatcher for clmstan

clm_prior

Prior Specification for clmstan

clm_stan

Fit a Cumulative Link Model using CmdStanR

clmstan-class

clmstan S3 Class

clmstan-package

clmstan: Cumulative Link Models with CmdStanR

cloglog_cdf

Complementary log-log CDF

coef.clmstan

Extract coefficients from clmstan objects

compute_probs_all

Compute category probabilities for all draws

compute_probs_single

Compute category probabilities for a single draw

compute_r_eff

Compute relative effective sample size for log-likelihood

convert_prior_spec_to_legacy

Convert Prior Specification to Internal Format

diagnostics

MCMC Diagnostics for clmstan objects

extract_acf

Extract ACF values from clmstan object

extract_link_param_draws

Extract link parameter draws for full model

extract_link_params_summary

Extract posterior summary for link parameters

extract_log_lik

Extract log-likelihood matrix from clmstan object

extract_posterior_summary

Extract posterior summary for specified parameters

extract_prediction_draws

Extract posterior draws needed for prediction

extract_y_rep

Extract y_rep from Stan fit

fitted.clmstan

Fitted values for clmstan objects

flat

Flat (Improper Uniform) Prior Distribution

format_dist

Format a distribution object as a string

gamma

Gamma Distribution for Prior Specification

get_base_link_params

Get base (fixed) link parameters from object

get_clmstan_draws

Get draws for plotting with bayesplot

get_coef_names

Get coefficient names from design matrix

get_default_link_prior

Get default prior for a link parameter

get_default_priors

Get default priors for a threshold structure

get_default_threshold_prior

Get default priors for threshold parameters

get_link_param_for_draw

Get link parameters for a specific draw

get_link_params

Get required parameters for a link function

get_link_type

Get link type number for Stan

get_model_name

Get Stan model name based on threshold and full model flag

get_sp_base_type

Get base type number for SP link

get_threshold_names

Generate threshold names in ordinal::clm style

get_threshold_params

Get threshold parameter information

gev_cdf

Generalized Extreme Value (GEV) link CDF

is_flexible_link

Check if a link function requires parameters

is.clmstan

Check if object is clmstan

link_functions

Available Link Functions

loggamma_cdf

Log-gamma link CDF

loglog_cdf

Log-log CDF

loo.clmstan

Leave-One-Out Cross-Validation for clmstan objects

make_design_matrix

Create design matrix

map_class_to_params

Map Parameter Class and Distribution to Legacy Parameter Names

needs_full_model

Check if any link parameter requires estimation

new_clmstan

Create a clmstan object (internal constructor)

normal

Normal Distribution for Prior Specification

parse_clm_formula

Parse formula for CLM

plot.clmstan

Plot method for clmstan objects

posterior_predict.clmstan

Posterior predictive distribution for clmstan objects

predict.clmstan

Predict method for clmstan objects

prepare_link_params_full

Prepare link parameters for full Stan model

prepare_link_params

Prepare link parameters for Stan

prepare_prediction_matrix

Prepare design matrix for prediction

prepare_stan_data_dispatch

Dispatch to appropriate data preparation function

prepare_stan_data_equidistant

Prepare data for equidistant threshold Stan model

prepare_stan_data_full

Prepare data for full Stan model with link parameter inference

prepare_stan_data_symmetric

Prepare data for symmetric threshold Stan model

prepare_stan_data

Prepare data for Stan model

print.clm_dist

Print method for clm_dist objects

print.clm_prior_list

Print method for clm_prior_list objects

print.clm_prior_spec

Print method for clm_prior_spec objects

print.clm_prior

Print method for clm_prior objects

print.clmstan

Print method for clmstan objects

print.summary.clmstan

Print method for summary.clmstan objects

prior

Specify Prior Distributions

sp_cdf

Symmetric Power (SP) link CDF

student_t

Student-t Distribution for Prior Specification

summarize_class_draws

Summarize class prediction draws

summarize_probs_draws

Summarize probability draws

summary.clmstan

Summary method for clmstan objects

supported_links

Get supported link functions

supported_thresholds

Get supported threshold structures

validate_full_params

Validate full model parameters

validate_link_params

Validate link parameters

validate_link

Check if a link function is valid

validate_prediction_input

Validate prediction inputs

validate_prior_class_dist

Validate that the distribution is compatible with the parameter class

validate_prior_values

Validate prior values

validate_prior

Validate prior specification for a model

validate_threshold

Validate threshold specification

waic.clmstan

Widely Applicable Information Criterion for clmstan objects

Fits cumulative link models (CLMs) for ordinal categorical data using 'CmdStanR'. Supports various link functions including logit, probit, cloglog, loglog, cauchit, and flexible parametric links such as Generalized Extreme Value (GEV), Asymmetric Exponential Power (AEP), and Symmetric Power. Models are pre-compiled using the 'instantiate' package for fast execution without runtime compilation. Methods are described in Agresti (2010, ISBN:978-0-470-08289-8), Wang and Dey (2011) <doi:10.1007/s10651-010-0154-8>, and Naranjo, Perez, and Martin (2015) <doi:10.1007/s11222-014-9449-1>.

  • Maintainer: Tomotaka Momozaki
  • License: MIT + file LICENSE
  • Last published: 2026-02-10 20:20:02 UTC