
Marginal (Cluster-Robust) Weibull Inference for KK Matched-Pair Survival Designs
Source:R/inference_survival_KK_weibull_marginal.R
InferenceSurvivalKKWeibullMarginal.RdInitialize the marginal (cluster-robust) Weibull inference object.
Returns the pooled treatment effect estimate (log-time-ratio scale).
Recomputes the treatment estimate under Bayesian-bootstrap weights.
Computes the asymptotic (cluster-robust) confidence interval.
Computes the asymptotic (cluster-robust) two-sided p-value.
Duplicates this subclass while preserving fit caches; see
Inference.
Details
Fits a single pooled Weibull Accelerated Failure Time (AFT) model across all subjects (treatment plus, optionally, all recorded covariates), ignoring the matched-pair structure in the mean model. Standard errors are computed via a cluster-robust (sandwich) covariance estimator: matched pairs from a KK matching-on-the-fly or binary-match design form size-2 clusters, and unmatched reservoir subjects each form their own singleton cluster.
This is the "marginal" competitor to InferenceSurvivalGLMMWeibullFrailtyNormalOneLik:
rather than modeling the within-pair correlation explicitly via a frailty
term, it fits an ordinary (working-independence) Weibull AFT model and
corrects the treatment-effect standard error post hoc for the within-pair
dependence. The model is fit via the package's fast C++ Weibull AFT backend
(fast_weibull_regression_general_cpp) and the cluster-robust sandwich is
assembled from per-subject dfbeta contributions collapsed within clusters,
which is numerically equivalent to
survival::survreg(..., cluster = ..., robust = TRUE) (retained as a
fallback if the C++ fit fails to converge).
Examples
# \donttest{
des = DesignSeqOneByOneKK14$new(n = 20, response_type = 'survival')
for (i in 1:20) {
des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1)))
}
des$add_all_subject_responses(rexp(20))
inf = InferenceSurvivalKKWeibullMarginal$new(des)
inf$compute_estimate()
#> [1] 0.1890897
# }