Skip to contents

Limits where -2 log(L(profile) / L(MLE)) equals the chi-squared quantile, found by bracketing from the Wald interval and bisection.

Usage

GlmProfCI(
  y,
  X,
  j,
  family = c("binomial", "poisson"),
  trials = NULL,
  alpha = 0.05
)

Arguments

y

Successes or counts.

X

Design matrix (with any intercept column).

j

Coefficient index (0-based, as in the Python arm).

family

"binomial" or "poisson".

trials

Binomial trials.

alpha

Level.

Value

list(estimate, se, ci, wald_ci, beta).

References

Bilder, C. R. & Loughin, T. M. (2025). Analysis of Categorical Data with R, 2nd ed. Eqs (2.12)-(2.13).

Examples

GlmProfCI(c(0, 0, 1, 0, 1, 1, 1, 0, 1, 1), cbind(1, 0:9), 1)$ci
#> [1] -0.07345926  1.19580544