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.
A model fitted using the Cyclops::fitCyclopsModel()
function.
The parameter in the cyclopsFit
object to profile.
The type of approximation. Valid options are 'normal'
, 'skew normal'
,
'custom'
, 'grid'
, or 'adaptive grid'
.
The bounds on the effect size used to fit the approximation.
A vector of parameters of the likelihood approximation.
# Simulate some data for this example:
populations <- simulatePopulations()
cyclopsData <- Cyclops::createCyclopsData(Surv(time, y) ~ x + strata(stratumId),
data = populations[[1]],
modelType = "cox"
)
#> as(<numLike>, "dgeMatrix") is deprecated since Matrix 1.5-0; do as(as(as(., "dMatrix"), "generalMatrix"), "unpackedMatrix") instead
cyclopsFit <- Cyclops::fitCyclopsModel(cyclopsData)
approximation <- approximateLikelihood(cyclopsFit, "x")
approximation
#> mu sigma gamma
#> 1 -0.9407448 1.053647 0.2303309
# (Estimates in this example will vary due to the random simulation)