make_param_errors: Calculate parameter errors via inversion of the Hessian...

Description Usage Arguments Value Examples

Description

Calculate parameter errors via inversion of the Hessian matrix (either pracma or numeric approximations).

Usage

1
2
make_param_errors(params, x, y, weight, family = poisson(),
  method = "numeric", dispersion = 1)

Arguments

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.

Value

Calculate the errors associated with each set of parameters.

Examples

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))

emax.glm documentation built on July 4, 2019, 5:04 p.m.