View source: R/estimate_variance.R
estimate_variance | R Documentation |
Estimates \eta = sd(X_\mathrm{new}^\top \hat{\beta})
where X_{\mathrm{new}}
is a new obs. and \hat{\beta}
is the MLE
when the true coefficient is \beta
estimate_variance(x, beta, family, b_var)
x |
A covariate matrix of size n*p. |
beta |
A vector of true model coef. (used to sample |
family |
A GLM family, with family and link. See also [compute_deriv()]. |
b_var |
Numeric. Number of bootstrap samples |
Generate b_var
parametric bootstrap samples by sampling new responses y
at the
observed covariates and when the model coef. is beta
.
Use SLOE to estimate \eta
in each bootstrap sample.
A vector of length b_var
of \hat{\eta}
in each bootstrap sample.
if the GLM function reports an error in more than 50
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.