Learn R Programming

brglm2 (version 1.0.1)

confint.mdyplFit: Method for computing confidence intervals for one or more regression parameters in a "mdyplFit" object

Description

Method for computing confidence intervals for one or more regression parameters in a "mdyplFit" object

Usage

# S3 method for mdyplFit
confint(object, parm, level = 0.95, hd_correction = FALSE, ...)

Arguments

object

a fitted model object.

parm

a specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered.

level

the confidence level required.

hd_correction

if FALSE (default), then the corresponding quantities are computed according to standard asymptotics. If TRUE then the high-dimensionality corrections in Sterzinger & Kosmidis (2024) are employed to updates estimates, estimated standard errors, z-statistics, etc. See Details.

...

additional argument(s) for methods.

Author

Ioannis Kosmidis [aut, cre] ioannis.kosmidis@warwick.ac.uk

See Also

mdyplFit(), summary.mdyplFit()

Examples

Run this code

# \donttest{

set.seed(123)
n <- 2000
p <- 800
set.seed(123)
betas <- c(rnorm(p / 4, mean = 7, sd = 1), rep(0, 3 * p / 4))
X <- matrix(rnorm(n * p, 0, 1/sqrt(n)), nrow = n, ncol = p)
probs <- plogis(drop(X %*% betas))
y <- rbinom(n, 1, probs)
fit_mdypl <- glm(y ~ -1 + X, family = binomial(), method = "mdyplFit")

wald_ci <- confint(fit_mdypl)
adj_wald_ci <- confint(fit_mdypl, hd_correction = TRUE)
ag_coverage <- function(cis, beta) mean((cis[, 1] < beta) & (cis[, 2] > beta))
ag_coverage(wald_ci, betas)
ag_coverage(adj_wald_ci, betas)

# }

Run the code above in your browser using DataLab