Learn R Programming

emax.glm (version 0.1.2)

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

Description

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

Usage

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

Run this code
# NOT RUN {
x <- model.matrix(~ factor(wool) + factor(tension), warpbreaks)
y <- warpbreaks$breaks

make.logLike(x, y)

# }

Run the code above in your browser using DataLab