make.dbinom: Build a Binomial log likelihood

Description Usage Arguments Value Examples

Description

Build a Binomial log likelihood

Usage

1
2
make.dbinom(x, y, linkinv = binomial()$linkinv, weight = 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 Binomial model.

Examples

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

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