approximateLikelihood {EvidenceSynthesis} R Documentation

## Approximate a likelihood function

### Description

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.

### Usage

approximateLikelihood(
cyclopsFit,
parameter = 1,
approximation = "custom",
bounds = c(log(0.1), log(10))
)


### Arguments

 cyclopsFit A model fitted using the Cyclops::fitCyclopsModel() function. parameter The parameter in the cyclopsFit object to profile. approximation The type of approximation. Valid options are 'normal', 'skew normal', 'custom', 'grid', or 'adaptive grid'. bounds The bounds on the effect size used to fit the approximation.

### Value

A vector of parameters of the likelihood approximation.

### Examples

# 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)



[Package EvidenceSynthesis version 0.3.0 Index]