em.glm_pracma_fit: Hessian routine

Description Usage Arguments Value Examples

Description

Hessian routine

Usage

1
2
em.glm_pracma_fit(x, y, b.list, class_probs, weight = c(1), K = 2,
  tol.1 = 1e-08, debug = FALSE, family = poisson(), maxiter = Inf)

Arguments

x

An n-by-p design matrix.

y

A vector of observation of length n.

b.list

List of K-classes each entry being a k length parameter vector,

class_probs

Matrix (n x K) of normalized class probabilities.

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.

K

Number of EM classes to be fit.

tol.1

Tolerance of the NR minimization.

debug

Boolen flag. Turn on to check optimization steps via messages.

family

GLM family to fit with.

maxiter

Maximum iterations of the NR methods for exiting before convergence.

Value

A list of parameter values on convergence for each of k-classes.

Examples

1
2
3
4
5
6
7
x <- model.matrix(~ 1 , data = warpbreaks)
y <- warpbreaks$breaks

b.list <- list(1, 1)
class_probs = matrix(rep(0.5, 54*2), ncol = 2)

em.glm_pracma_fit(x = x, y = y, b.list = b.list, class_probs = class_probs)

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