Learn R Programming

lllcrc (version 1.2)

zglm: Maximum likelihood for log-linear coefficients

Description

A simplified version of glm that does only parameter estimation

Usage

zglm(predictors, data, normalized = TRUE, precision = 1000)

Arguments

predictors
The columns of the standard design matrix to include in the model. For example, "c1", "c2" for main effects, and "c12" for interactions.
data
A design matrix with cell counts included
normalized
Logical: If TRUE, include a normalization step after coefficient estimation, which resets the value of the intercept so that the sum of predicted values is exactly 1
precision
Controls the precision of the coefficient estimates. A higher number is less precise. 1 corresponds to machine epsilon.

Value

The vector of estimated log-linear coefficients. The first coefficient is the intercept, and the remaining ones correspond to the predictors argument, in that order

Details

Maximize the Poisson likelihood using BFGS in optim().