View source: R/FixedEffectMetaAnalysis.R
computeFixedEffectMetaAnalysis | R Documentation |
Compute a fixed-effect meta-analysis using a choice of various likelihood approximations.
computeFixedEffectMetaAnalysis(data, alpha = 0.05)
data |
A data frame containing either normal, skew-normal, custom parametric, or grid likelihood data. One row per database. |
alpha |
The alpha (expected type I error) used for the confidence intervals. |
The meta-analytic estimate, expressed as the point estimate hazard ratio (rr), its 95 percent confidence interval (lb, ub), as well as the log of the point estimate (logRr), and the standard error (seLogRr).
approximateLikelihood, computeBayesianMetaAnalysis
# Simulate some data for this example:
populations <- simulatePopulations()
# Fit a Cox regression at each data site, and approximate likelihood function:
fitModelInDatabase <- function(population) {
cyclopsData <- Cyclops::createCyclopsData(Surv(time, y) ~ x + strata(stratumId),
data = population,
modelType = "cox"
)
cyclopsFit <- Cyclops::fitCyclopsModel(cyclopsData)
approximation <- approximateLikelihood(cyclopsFit, parameter = "x", approximation = "custom")
return(approximation)
}
approximations <- lapply(populations, fitModelInDatabase)
approximations <- do.call("rbind", approximations)
# At study coordinating center, perform meta-analysis using per-site approximations:
computeFixedEffectMetaAnalysis(approximations)
# (Estimates in this example will vary due to the random simulation)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.