Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: glm
See also: glmcore glmlld glmstat

Quantlet: glmll
Description: glmll computes the individual log-likelihood.

Link:
Usage: ll = glmll(code,mu,y{,opt})
Input:
code text string, the short code for the model (e.g. "bilo" for logit or "noid" for ordinary OLS).
mu n x 1, n x 2 or n x 3 matrix, either the response function, or sums of response function in the first column. In second and third column expressions needed for computation of deviance (typically sums of mu^2 or log(mu)).
y n x 1, n x 2 or n x 3 matrix, either the response values, or sums of response values in the first column. In second and third column expressions needed for computation of deviance (typically sums of y^2 or log(y)).
opt optional, a list with optional input. "glmopt" can be used to set up this parameter.
opt.phi nuisance parameter, usually the dispersion parameter. If not given, only those parts of the log-likelihood are computed, which depend on the parameter of interest.
opt.nbk scalar, extra parameter k for negative binomial distribution. If not given, set to 1 (geometric distribution).
Output:
ll n x 1 matrix, log-likelihood.

Example:
library("glm")
y=1
mu=0.75
ll=glmll("bilo",mu,y)
ll

Result:
The log-likelihood for logit at y=1 and mu=0.75:
Contents of ll
[1,] -0.28768



Author: M. Mueller, 20010228
(C) MD*TECH Method and Data Technologies, 05.02.2006