boot_fun: Compute one bootstrap for a GLM

View source: R/boot_fun.R

boot_funR Documentation

Compute one bootstrap for a GLM

Description

Generates one parametric bootstrap sample given GLM family and model coefficients.

Usage

boot_fun(X, beta, family, sloe = F)

Arguments

X

A n*p covariate matrix (each row represents one obs.).

beta

Model coefficient.

family

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

sloe

If True, use SLOE to estimate \eta = \var(X_{\mathrm{new}^\top \hat{\beta}})^{1/2} (see the function estimate_eta).

Details

This model does not fit an intercept. As a result, if you would like to fit an intercept, please include a column of 1 in the matrix X.

Value

coef

A length p vector of MLE coefficients.

eta_hat

If sloe = T, returns the estimated \hat{\eta}.


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