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: gplmcore

Macro: 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 ordinary PLM). 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. The macro "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:
Content of object ll1
[1,]   0.1192 
Content of object ll2
[1,] -0.10499  

Library: glm
See also: gplmcore

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

Author: Marlene Mueller, 970523
(C) MD*TECH Method and Data Technologies, 28.6.1999