confint.mdyplFit: Method for computing confidence intervals for one or more...

View source: R/mdyplFit.R

confint.mdyplFitR Documentation

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 class 'mdyplFit'
confint(object, parm, level = 0.95, hd_correction = FALSE, se_start, ...)

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 summary corresponding to standard asymptotics is computed. If TRUE then the high-dimensionality corrections in Sterzinger & Kosmidis (2024) are employed to updates estimates, estimated standard errors, z-statistics. See Details.

se_start

a vector of starting values for the state evolution equations. See the start argument in solve_se().

...

additional argument(s) for methods.

Author(s)

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

See Also

mdyplFit(), summary.mdyplFit()

Examples


## Not run: 

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)


## End(Not run)


brglm2 documentation built on Aug. 29, 2025, 5:25 p.m.