
Sensitivity to specified sampling covariance assumptions
network_covariance_sensitivity.RdRefit a joint network model under analyst-specified within-study sampling covariances while retaining the same effects, mean model and random-effect structure.
Value
A named list of refitted joint network objects, one per scenario. The model interface and prediction metadata are retained. No automatic difference difference table or hypothesis test is computed. Treatment p-value adjustment is retained and recalculated for each refit.
Details
Each scenario replaces sampling covariance S, not the heterogeneity covariance.
The function performs a complete refit, retaining reference, strata, moderators,
random grouping levels, estimation method and inference choice. Heterogeneity is
re-estimated unless fixed in the original model.
Covariance names are aligned to the fitted observation IDs. Every scenario must retain the original marginal sampling variances, be symmetric and valid under the model's positive-definiteness checks, and have zero cross-study covariance. Each study-block list must contain exactly the fitted studies. Invalid scenarios raise an error; no correlation or participant-overlap information is imputed.
Compare treatment estimates, standard errors, intervals, heterogeneity and convergence across plausible scenarios. Stability supports robustness to those specific dependence assumptions, not to all possible assumptions. An independence scenario for shared-arm data is a deliberate sensitivity perturbation, not evidence that those sampling errors are independent. The function does not select a best scenario or perform a statistical test of covariance correctness. Changing the effects, standardizer or marginal variances requires a separately specified analysis.
Examples
d <- data.frame(id=paste0("i",1:12),study=rep(1:6,each=2),a="A",
b=rep(c("B","C"),6),effect=rep(c(.3,.6),6),variance=.04)
S0 <- diag(d$variance);dimnames(S0)<-list(d$id,d$id)
S1 <- S0
for(ii in split(seq_len(nrow(d)),d$study)) S1[ii,ii]<-matrix(c(.04,.015,.015,.04),2)
fit <- network_meta(d,"study","a","b","effect","variance",
observation_id="id",sampling_covariance=S1)
sensitivity <- network_covariance_sensitivity(fit,list(independent=S0,shared=S1))
vapply(sensitivity,function(x) x$effects$total_se[1],numeric(1))
#> independent shared
#> 0.08164966 0.08164966