View source: R/LikelihoodApproximation.R
approximateLikelihood | R Documentation |
Approximate the likelihood function using a parametric (normal, skew-normal, or custom parametric), or grid approximation. The approximation does not reveal person-level information, and can therefore be shared among data sites. When counts are low, a normal approximation might not be appropriate.
approximateLikelihood(
cyclopsFit,
parameter = 1,
approximation = "custom",
bounds = c(log(0.1), log(10))
)
cyclopsFit |
A model fitted using the |
parameter |
The parameter in the |
approximation |
The type of approximation. Valid options are |
bounds |
The bounds on the effect size used to fit the approximation. |
A vector of parameters of the likelihood approximation.
computeConfidenceInterval, computeFixedEffectMetaAnalysis, computeBayesianMetaAnalysis
# Simulate some data for this example:
populations <- simulatePopulations()
cyclopsData <- Cyclops::createCyclopsData(Surv(time, y) ~ x + strata(stratumId),
data = populations[[1]],
modelType = "cox"
)
cyclopsFit <- Cyclops::fitCyclopsModel(cyclopsData)
approximation <- approximateLikelihood(cyclopsFit, "x")
approximation
# (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.