make.logLike: Construct a log-likelihood function in the parameters b, for...

Description Usage Arguments Value Examples

Description

Construct a log-likelihood function in the parameters b, for the given link family.

Usage

1
2
make.logLike(x, y, weight = c(1), class_probs = c(1),
  family = poisson)

Arguments

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.

class_probs

An n length vector of probabilities for the proposed model.

family

The GLM family being considered.

Value

A model likelihood function. Expects one argument which is a *p* length vector of parameters.

Examples

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

make.logLike(x, y)

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