Profiles one parameter, maximising over the others, and inverts the likelihood ratio test to obtain an interval.
Usage
bd_profile_ci(
object,
parameter = "b",
level = 0.95,
grid = NULL,
n_grid = 60L,
method = "Nelder-Mead"
)
# S3 method for class 'bd_profile'
print(x, ...)Arguments
- object
A fitted `"betadanish"` object.
- parameter
Name of the parameter to profile, one of `"a"`, `"b"`, `"c"` or `"k"`. Default `"b"`.
- level
Confidence level. Default 0.95.
- grid
Optional numeric vector of values to scan. If `NULL` (default) a log-spaced grid is built around the estimate.
- n_grid
Number of grid points when `grid` is `NULL`.
- method
Optimisation method for the nuisance parameters, passed to [stats::optim()].
- x
A `"bd_profile"` object.
- ...
Ignored.
Value
An object of class `"bd_profile"` with the interval, the grid, the profile log-likelihood, and the critical value.
Details
The interval is the set of values \(\theta_0\) for which \(2\{\ell_{\max} - \ell_p(\theta_0)\} \le \chi^2_{1,\,\mathrm{level}}\), with \(\ell_p\) the profile log-likelihood.
**An open upper bound is a result, not a failure.** For a weakly identified tail index the profile can stay inside the critical region all the way to the top of the grid, in which case `upper` is returned as `Inf` and the honest report is a lower bound rather than a point estimate with an interval. The thesis pipeline records precisely this on the breaking-stress data, where the profile gives \(b \ge 26.1\) with no finite upper bound.
Widening `grid` will not manufacture a bound; it only confirms the flatness.
Examples
# \donttest{
dat <- simulate_bd_data(200, a = 1, b = 3, c = 2, k = 0.5, seed = 2)
fit <- fit_betadanish(survival::Surv(time, status) ~ 1, data = dat,
submodel = TRUE, n_starts = 3)
p <- bd_profile_ci(fit, "b")
p
#> Profile likelihood interval for b
#> estimate: 2.13908
#> 95% interval: [0.13104, 3.37823]
# }