Compute the point estimate and confidence interval given a likelihood function approximation

computeConfidenceInterval(approximation, alpha = 0.05)

Arguments

approximation

An approximation of the likelihood function as fitted using the approximateLikelihood() function.

alpha

The alpha (expected type I error).

Value

A data frame containing the point estimate, and upper and lower bound of the confidence interval.

Details

Compute the point estimate and confidence interval given a likelihood function 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")
computeConfidenceInterval(approximation)
#> Detected data following custom parameric distribution
#>         rr        lb      ub     logRr   seLogRr
#> 1 1.729533 0.2441386 7.93263 0.5478516 0.8880275