Description Usage Arguments Value Examples
Calculate parameter errors via inversion of the Hessian matrix (either pracma or numeric approximations).
1 2 | make_param_errors(params, x, y, weight, family = poisson(),
method = "numeric", dispersion = 1)
|
params |
Optimal parameters |
x |
An n-by-p design matrix. |
y |
A vector of observation of length n. |
weight |
A n length vector of observation weight terms. This is currently designed to be either the exposure for a Poisson model or the number of trials for a Logistic model. |
family |
GLM family to fit. |
method |
Control string. Set to 'numeric' or 'pracma'. |
dispersion |
Model dispersion parameter for over/ under-dispersed models. Defaults to 1. |
Calculate the errors associated with each set of parameters.
1 2 3 4 5 | x <- model.matrix(~ factor(wool) + factor(tension), warpbreaks)
y <- warpbreaks$breaks
m <- em.glm(x = x, y = y, K = 2, b.init = "random")
make_param_errors(m$params, x = x, y = y ,weight = c(1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.