glm_boot: Resized bootstrap method for a GLM

View source: R/glm_boot.R

glm_bootR Documentation

Resized bootstrap method for a GLM

Description

Estimates the MLE distribution of a GLM using the resized bootstrap method

Usage

glm_boot(
  glm_fit,
  simulate_fun = NULL,
  s_interval = 0.02,
  b_var = 5,
  b_boot = 100,
  robust_est = FALSE,
  verbose = TRUE,
  filename = NA
)

Arguments

glm_fit

A glm object returned by [stats:glm] function. It should contain the covariates x and responses y, i.e., the output of glm(.., x = T, y = T).

simulate_fun

A function to simulate new responses (the inputs are an observation matrix and a vector of coefficients).

s_interval

A numeric value of increment of the sequence of shrinkage factors s. If s_interval = 0.2, then the list of shrinkage factors would be (0, 0.2, 0.4, ..., 1).

b_var

A numeric value of the number of parametric bootstrap samples at each s to estimate signal strength parameter \gamma.

b_boot

A numeric value of the number of bootstrap samples to estimate the bias and variance of the MLE.

robust_est

If TRUE, use robust estimator of the bias and std.dev.

verbose

Print progress if TRUE.

filename

filename If a file name is provided, then save the plot of \hat{\eta}(s) versus shrinkage factors \gamma to filename (see also [estimate_gamma]).

Value

glm_fit

The input GLM object.

beta_s

\beta_s = s_\star\cdot \hat{\beta} satisfies \var(X^\top \beta_s)\approx \gamma^2.

gamma_hat

The estimated signal strength parameter \gamma.

alpha

A numeric value of the estimated inflation of the MLE, i.e., \hat{\beta}/\alpha is approximately unbiased of the true model coef.

sd

A numeric value of the estimated std.dev. of the MLE.

boot_sample

A matrix of size p*b_boot (p is the number of variables) of the bootstrap MLE.


zq00/glmhd documentation built on April 7, 2023, 7:45 a.m.