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

Quantlet: glmlld
Description: glmlld computes the first and second derivative of the individual log-likelihood in dependence of the linear index eta and y.

Link:
Usage: {ll1,ll2} = glmlld(code,eta,y{,opt})
Input:
code text string, the short code for the model (e.g. "bipro" for probit or "noid" for linear model). Append "fs" to the code for the expected ll2 instead of ll2 (-> Fisher scoring algorithm).
eta n x d matrix, the index values.
y n x d matrix, the response values.
opt optional, a list with optional input. "glmopt" can be used to set up this parameter.
opt.pow scalar, power for power link. If not given, set to 0 (logarithm).
opt.nbk scalar, extra parameter k for negative binomial distribution. If not given, set to 1 (geometric distribution).
Output:
ll1 n x d matrix, 1st derivative of log-likelihood.
ll2 n x d matrix, 2nd derivative of log-likelihood.

Example:
library("glm")
y=1
eta=2
{ll1,ll2}=glmlld("bilo",eta,y)
ll1
ll2

Result:
The derivatives of the individual log-likelihood for a logit
model are computed at y=1 and eta=2:
Contents of ll1
[1,]   0.1192
Contents of ll2
[1,] -0.10499



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