superiorityAnalysis {epts}R Documentation

Superiority Analysis Across Interventions for CRT, MST, or SRT Designs

Description

This function performs a Bayesian superiority analysis, comparing each intervention against a reference intervention, across cluster randomized trials (CRT), multisite trials (MST) or simple randomized trials (SRT).

Usage

superiorityAnalysis(
  method = c("crt", "mst", "srt"),
  data,
  outcome = "posttest",
  interventions = "interventions",
  Random = "schools",
  Nsim = 10000,
  Threshold = 0.05,
  refintervention = 1,
  SupThreshold = 0.8,
  continuous_covariates = NULL,
  categorical_covariates = NULL
)

Arguments

method

The trial design type: "crt", "mst", or "srt".

data

A data frame containing the variables including outcome, predictors, the clustering variable, and the intervention.

outcome

The name of the outcome (post-test) variable.

interventions

A string specifying the intervention variable.

Random

The name of the clustering variable (e.g., schools or sites) for CRT and MST designs.

Nsim

Number of MCMC iterations to be performed. A minimum of 10,000 is recommended to ensure convergence.

Threshold

The effect size threshold for posterior computation (default = 0.05).

refintervention

The value of the intervention used as the reference group (default = 1).

SupThreshold

The minimum posterior probability threshold to declare superiority (default = 0.8).

continuous_covariates

A character vector specifying the names of continuous covariates.

categorical_covariates

A character vector specifying the names of categorical covariates (converted to factors).

Details

The effect size is estimated against a reference intervention, which by default is intervention 1 but can be reassigned to any other intervention, including the control (refintervention = 0).

Value

A data.frame with columns:

See Also

crtBayes, mstBayes, srtBayes functions from the eefAnalytics package

Examples


###Superiority analysis of cluster randomized trial###
data(crt4armSimData)
superiorityAnalysis(method = "crt", data = crt4armSimData, outcome = "posttest",
interventions = "interventions", Random = "schools", Nsim = 10000, refintervention = 2,
Threshold = 0.05, SupThreshold = 0.8,continuous_covariates = c("pretest"),
categorical_covariates = c("gender", "ethnicity"))

###Superiority analysis of multisite trial###
data(mst4armSimData)
superiorityAnalysis(method = "mst", data = mst4armSimData, outcome = "posttest",
interventions = "interventions", Random = "schools", Nsim = 10000, refintervention = 2,
Threshold = 0.05, SupThreshold = 0.8,continuous_covariates = c("pretest"),
categorical_covariates = c("gender", "ethnicity"))

###Superiority analysis of simple randomized trial###
data(srt4armSimData)
superiorityAnalysis(method = "srt", data = srt4armSimData, outcome = "posttest",
interventions = "interventions", Nsim = 10000, refintervention = 2,
Threshold = 0.05, SupThreshold = 0.8,continuous_covariates = c("pretest"),
categorical_covariates = c("gender", "ethnicity"))




[Package epts version 1.2.2 Index]