bootglm: Compute resized bootstrap MLE for a GLM multiple times

View source: R/bootglm.R

bootglmR Documentation

Compute resized bootstrap MLE for a GLM multiple times

Description

This function implements a parametric bootstrap (for a GLM). Unlike the standard parametric bootstrap, where we use the MLE to generate new responses, here user can input a coefficient vector beta. The function calls the the function boot_fun, which implements the resized bootstrap once, and returns a vector of MLE.

Usage

bootglm(X, beta, family, b_boot, verbose)

Arguments

X

A covariate matrix of size n * p.

beta

A vector of length n. Coefficients where the parametric bootstrap is applied.

family

An object of class family. Besides the usual definition of glm family (see [stats::family]), family should include an additional element simulate_fun (see [get_simulate_fun]).

b_boot

An integer of number of bootstrap samples.

verbose

Print progress if T.

Value

mle_boot a matrix of size p * b_boot of the bootstrap MLE Returns error if the bootstrap MLE does not exist more than 20


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