
Proportional Odds Regression Inference for Ordinal Responses
Source:R/inference_ordinal_proportional_odds.R
InferenceOrdinalPropOddsRegr.RdFits a proportional-odds (cumulative-logit) regression, via
fast_ordinal_regression_with_var_cpp (see that page for the
full model), for ordinal responses using the treatment indicator and,
optionally, all recorded covariates as predictors. This is a full-likelihood
class (likelihood_tier = "full") supporting score, gradient, and
likelihood-ratio tests, plus parametric likelihood-ratio bootstrap
calibration, in addition to Wald and resampling-based inference.
References
McCullagh, P. (1980). "Regression Models for Ordinal Data." Journal of the Royal Statistical Society, Series B, 42(2), 109-142, doi:10.1111/j.2517-6161.1980.tb01109.x , for the proportional-odds cumulative-logit model fit here.
Super class
Inference -> InferenceOrdinalPropOddsRegr
Methods
Public methods
+ inherited public methods from Inference
Inference$capabilities()Inference$compute_asymp_confidence_interval()Inference$compute_asymp_two_sided_pval()Inference$compute_estimate()Inference$compute_exact_confidence_interval()Inference$compute_exact_two_sided_pval_for_treatment_effect()Inference$duplicate()Inference$get_analysis_data()Inference$get_covariates()Inference$get_design_object()Inference$get_model_formula()Inference$get_nonestimable_reason()Inference$get_nonestimable_stage()Inference$get_optimization_alg()Inference$get_response()Inference$get_response_type()Inference$get_treatment()Inference$initialize()Inference$is_nonestimable()Inference$set_optimization_alg()Inference$set_seed()Inference$supports()
Examples
# \donttest{
seq_des = DesignSeqOneByOneBernoulli$new(n = 10, response_type = 'ordinal')
for (i in 1:10) {
seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1)))
}
seq_des$add_all_subject_responses(sample(1:4, 10, replace = TRUE))
inf = InferenceOrdinalPropOddsRegr$new(seq_des)
inf$compute_estimate()
#> [1] 0.3549374
# }
# \donttest{
inf$set_seed(1)
inf$compute_lik_ratio_bootstrap_two_sided_pval(delta = 0, B = 9, show_progress = FALSE)
#> [1] 1
# }