Skip to contents

Fits a combined conditional-logit-plus-random-intercept-GLMM likelihood for incidence responses under a KK matching-on-the-fly design, where reservoir (unmatched) subjects are included in the GLMM component (private$combine_reservoir_into_glmm() == TRUE), so all subjects (discordant matched pairs, concordant matched pairs, and reservoir) enter one joint likelihood with a single treatment coefficient \(\beta_T\). See InferencePropKKGLMM for the full model form (conditional-logit-on-discordant plus random-intercept-GLMM, jointly maximized) and InferenceAbstractKKCondLogitGLMM for the shared fitting/caching contract. Contrast with the sibling InferenceIncidKKCondLogitGLMMIVWC, which excludes reservoir subjects from the GLMM component. See InferenceAbstractKKCondLogitGLMM's known estimability limitation at high covariate counts, which applies here too.

Super classes

Inference -> InferenceAbstractKKCondLogitGLMM -> InferenceIncidKKCondLogitGLMMOneLik

Methods

+ inherited public methods from InferenceAbstractKKCondLogitGLMM
+ inherited public methods from Inference


InferenceIncidKKCondLogitGLMMOneLik$new()

Initialize inference for the combined conditional-logit (discordant matched pairs) plus random-intercept-GLMM (concordant pairs and reservoir subjects) incidence model; see InferenceIncidKKCondLogitGLMMOneLik for the model form. Does not fit the model; the fit is deferred to the first call to compute_estimate() or a method that requires it.

Usage

InferenceIncidKKCondLogitGLMMOneLik$new(
  des_obj,
  model_formula = NULL,
  max_abs_reasonable_coef = 50,
  max_abs_reasonable_se = 1.25,
  max_abs_log_sigma = 8,
  verbose = FALSE,
  smart_cold_start_default = NULL,
  optimization_alg = NULL
)

Arguments

des_obj

A completed Design object with an incidence response.

model_formula

Optional formula for covariate adjustment.

max_abs_reasonable_coef

Cap for reasonable coefficient estimates.

max_abs_reasonable_se

Cap for reasonable treatment standard errors.

max_abs_log_sigma

Cap for reasonable log random effect variance.

verbose

Whether to print progress messages.

smart_cold_start_default

Whether to use smart optimizer start values.

optimization_alg

Character. Optimization algorithm (default "lbfgs").


InferenceIncidKKCondLogitGLMMOneLik$clone()

The objects of this class are cloneable with this method.

Usage

InferenceIncidKKCondLogitGLMMOneLik$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# \donttest{
seq_des = DesignSeqOneByOneKK14$new(n = 10, response_type = 'incidence')
for (i in 1:10) {
  seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1), x2 = rnorm(1)))
}
seq_des$add_all_subject_responses(rbinom(10, 1, 0.5))
inf = InferenceIncidKKCondLogitGLMMOneLik$new(seq_des)
inf$compute_estimate()
#> [1] 2.795171
# }