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 grid with gradients distribution
#>          rr         lb       ub    logRr  seLogRr
#> 1 0.6416258 0.03102474 3.774587 -0.44375 1.224834