Skip to contents

Symmetric Wald intervals on the log-parameter scale, exponentiated back.

Usage

bd_wald_ci(object, level = 0.95)

Arguments

object

A fitted `"betadanish"` object.

level

Confidence level. Default 0.95.

Value

A matrix with one row per parameter and columns `estimate`, `se`, `lower` and `upper`.

Details

All four parameters are strictly positive, so a symmetric interval on the natural scale can and does cross zero when a parameter is weakly identified. Building the interval on the log scale and exponentiating keeps it inside the parameter space: \(\hat\theta \exp(\pm z\, \mathrm{SE}(\log\hat\theta))\).

This is still a Wald interval, and it inherits the usual weakness: it assumes the log-likelihood is approximately quadratic. Where it is not – which is exactly where these intervals matter – prefer [bd_profile_ci()].

See also

[bd_profile_ci()], [bd_identified_coef()]

Examples

# \donttest{
dat <- simulate_bd_data(150, a = 1, b = 3, c = 2, k = 0.5, seed = 1)
fit <- fit_betadanish(survival::Surv(time, status) ~ 1, data = dat,
                      submodel = TRUE, n_starts = 3)
bd_wald_ci(fit)
#>    estimate        se     lower    upper
#> b 3.0790232 0.7568085 1.9019184 4.984643
#> c 2.7445901 0.7194401 1.6419194 4.587786
#> k 0.7373338 0.3755216 0.2717378 2.000683
#> attr(,"level")
#> [1] 0.95
#> attr(,"scale")
#> [1] "log-scale Wald, exponentiated"
# }