Skip to contents

An abstract R6 Class that provides asymptotic tests and intervals for a treatment effect in a sequential design where the common denominator is a summary table from a glm.

Methods

+ inherited public methods from InferenceAsymp
+ inherited public methods from InferenceJackknife
+ inherited public methods from InferenceBayesianBootstrap
+ inherited public methods from InferenceRandBootstrapCI
+ inherited public methods from InferenceRandBootstrap
+ inherited public methods from InferenceNonParamBootstrap
+ inherited public methods from InferenceRandCI
  • InferenceRandCI$compute_rand_confidence_interval()
  • InferenceRandCI$compute_rand_two_sided_pval()
+ inherited public methods from InferenceRand
+ inherited public methods from Inference


InferenceMLEorKMSummaryTable$compute_estimate()

Computes the appropriate estimate for mean difference

Usage

InferenceMLEorKMSummaryTable$compute_estimate(estimate_only = FALSE)

Arguments

estimate_only

If TRUE, skip variance component calculations.

Returns

The setting-appropriate (see description) numeric estimate of the treatment effect

Examples

seq_des = DesignSeqOneByOneBernoulli$new(n = 6, response_type = "continuous")
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[1, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[2, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[3, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[4, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[5, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[6, 2 : 10])
seq_des$add_all_subject_responses(c(4.71, 1.23, 4.78, 6.11, 5.95, 8.43))

seq_des_inf = InferenceContinMultOLS$new(seq_des)
seq_des_inf$compute_estimate()


InferenceMLEorKMSummaryTable$compute_asymp_confidence_interval()

Computes a 1-alpha level frequentist confidence interval

Usage

InferenceMLEorKMSummaryTable$compute_asymp_confidence_interval(alpha = 0.05)

Arguments

alpha

The confidence level in the computed confidence interval is 1 - alpha. The default is 0.05.

Returns

A (1 - alpha)-sized frequentist confidence interval for the treatment effect


InferenceMLEorKMSummaryTable$compute_asymp_two_sided_pval()

Compute a two-sided p-value for model-summary-table inference by using the cached treatment estimate and standard error from the fitted model or Kaplan-Meier summary. See InferenceMLEorKMSummaryTable and InferenceAsymp.

Usage

InferenceMLEorKMSummaryTable$compute_asymp_two_sided_pval(delta = 0)

Arguments

delta

The null difference to test against. For any treatment effect at all this is set to zero (the default).

Returns

The approximate frequentist p-value


InferenceMLEorKMSummaryTable$clone()

The objects of this class are cloneable with this method.

Usage

InferenceMLEorKMSummaryTable$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `InferenceMLEorKMSummaryTable$compute_estimate()`
## ------------------------------------------------

if (FALSE) { # \dontrun{
seq_des = DesignSeqOneByOneBernoulli$new(n = 6, response_type = "continuous")
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[1, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[2, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[3, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[4, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[5, 2 : 10])
seq_des$add_one_subject_to_experiment_and_assign(MASS::biopsy[6, 2 : 10])
seq_des$add_all_subject_responses(c(4.71, 1.23, 4.78, 6.11, 5.95, 8.43))

seq_des_inf = InferenceContinMultOLS$new(seq_des)
seq_des_inf$compute_estimate()
} # }