Skip to contents

Estimates confidence intervals for the fitted risks model. For binomial models, large-sample confidence intervals, not profile likelihood, are used.

Usage

# S3 method for class 'risks'
confint(
  object,
  parm,
  level = 0.95,
  bootrepeats = 1000,
  bootci = "bca",
  jacksd = FALSE,
  ...
)

Arguments

object

A fitted risks model

parm

Not used, for compatibility

level

Optional. Confidence level. Defaults to 0.95.

bootrepeats

Optional and only applicable to approach = "margstd_boot": bootstrap repeats. Defaults to 1000. Consider increasing.

bootci

Optional and only applicable to approach = "margstd_boot": type of bootstrap confidence interval. Available methods:

  • "bca" Default. Parametric BCa (bias-corrected accelerated) bootstrap confidence intervals.

  • "normal" Parametric normality-based confidence intervals, which require lower repeat numbers but are less accurate and may result in invalid results for ratios.

  • "nonpar" Non-parametric BCa confidence intervals, which should be used with caution because of the risk of sparse-data bias with non-parametric bootstrapping.

jacksd

Optional and only applicable to approach = "margstd_boot": Also return jackknife estimate of Monte-Carlo error for the confidence limits? Only functional with BCa confidence intervals. Defaults to FALSE.

...

Passed on.

Value

Matrix: First column, lower bound; second column, upper bound.

Examples

confint(
  riskratio(
    formula = death ~ stage + receptor,
    data = breastcancer))
#>                    2.5 %   97.5 %
#> stageStage I   0.0000000 0.000000
#> stageStage II  0.1395299 1.658324
#> stageStage III 1.0671711 2.550242