Skip to contents

Fits 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

+ inherited public methods from Inference


InferenceOrdinalPropOddsRegr$set_custom_randomization_statistic_function()

Usage

InferenceOrdinalPropOddsRegr$set_custom_randomization_statistic_function(
  custom_randomization_statistic_function
)


InferenceOrdinalPropOddsRegr$set_custom_randomization_statistic_cpp()

Usage

InferenceOrdinalPropOddsRegr$set_custom_randomization_statistic_cpp(fn)


InferenceOrdinalPropOddsRegr$approximate_randomization_distribution_beta_hat_T()

Usage

InferenceOrdinalPropOddsRegr$approximate_randomization_distribution_beta_hat_T(
  r = 501,
  delta = 0,
  transform_responses = "none",
  show_progress = TRUE,
  permutations = NULL,
  debug = FALSE,
  zero_one_logit_clamp = .Machine$double.eps
)


InferenceOrdinalPropOddsRegr$supports_rand_pval_for_incidence()

Usage

InferenceOrdinalPropOddsRegr$supports_rand_pval_for_incidence()


InferenceOrdinalPropOddsRegr$compute_rand_two_sided_pval()

Usage

InferenceOrdinalPropOddsRegr$compute_rand_two_sided_pval(
  r = 501,
  delta = 0,
  transform_responses = "none",
  na.rm = TRUE,
  show_progress = TRUE,
  permutations = NULL,
  zero_one_logit_clamp = .Machine$double.eps
)


InferenceOrdinalPropOddsRegr$clone()

The objects of this class are cloneable with this method.

Usage

InferenceOrdinalPropOddsRegr$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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
# }