glm.lld: Log-likelihood derivatives for GLM

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Computes first and second derivatives of the individual log-likelihood with respect to the linear predictor. Currently only the gaussian (with identity link) and the bernoulli family (with logit and probit links) are implemented.

Usage

1
glm.lld(eta, y, family="gaussian", link="identity", k=1)

Arguments

eta

n x 1, linear predictors

y

n x 1, responses

family

text string, family of distributions (e.g. "gaussian" or "bernoulli", see details for glm.ll)

link

text string, link function (depending on family, see details for glm.ll)

k

integer > 0, parameter for the negative binomial

Details

See details for glm.ll.

Value

List with components:

ll1

n x 1, vector of first derivatives

ll2

n x 1, vector of second derivatives

ll1.2

n x 1, ratio ll1/ll2

Author(s)

Marlene Mueller

See Also

glm.ll, glm.link

Examples

1
  glm.lld(c(-1,2), c(0,1), family="bernoulli", link="logit")

Example output

Loading required package: AER
Loading required package: car
Loading required package: carData
Loading required package: lmtest
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: sandwich
Loading required package: survival
         ll1        ll2     ll1.2
1 -0.2689414 -0.1966119  1.367879
2  0.1192029 -0.1049936 -1.135335

gplm documentation built on May 2, 2019, 2:10 a.m.