make.dpois: Build a Poisson log likelihood

Description Usage Arguments Value Examples

Description

Build a Poisson log likelihood

Usage

1
2
make.dpois(x, y, linkinv = poisson()$linkinv, weight = c(1),
  log = FALSE)

Arguments

x

An n-by-p design matrix.

y

A vector of observation of length n.

linkinv

Inverse link function desired

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.

log

Boolean flag. If TRUE returns the log dist.

Value

A function to calculate (log) likelihood for a given set of parameters under a Poisson model.

Examples

1
2
3
x <- model.matrix(~ factor(wool) + factor(tension), warpbreaks)
y <- warpbreaks$breaks
make.dpois(x, y)

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