logpoisson {glmmAK} | R Documentation

## Poisson log-linear regression model

### Description

Fits the poisson log-linear regression model using the maximum-likelihood. The log-likelihood is maximized using the Newton-Raphson algorithm (the same as Fisher scoring in this case). The function returns the inverse of the observed and expected information matrix.

### Usage

    logpoisson(y, x, offset=0, epsilon=1e-08, maxit=25, trace=FALSE)

    ## S3 method for class 'logpoisson':
    print(x, ...)

    ## S3 method for class 'logpoisson':
    summary(object, ...)

### Arguments

`y` | response vector taking integer values or zero.
`x` | matrix or data.frame with covarites. Intercept is included by default in the model and should not be included in `x`.
`offset` | possible offset term. It is assumed to be equal to zero if not specified.
`epsilon` | positive convergence tolerance epsilon. The iterations converge when abs((l[new] - l[old])/l[new]) <= epsilon, where l denotes the value of the log-likelihood.
`maxit` | integer giving the maximal number of iterations.
`trace` | logical indicating if output should be produced for each iteration.
`object` | an object of class "logpoisson".
`...` | other arguments passed to `print` or `summary`.

### Value

An object of class "logpoisson". This has components

`coefficients` | the coefficients of the linear predictor.
`loglik` | the value of the log-likelihood.
`score` | the score vector.
`vcov` | the inverse of the information matrix.
`linear.predictors` | the values of the linear predictor for each observation.
`fitted.values` | the values of fitted counts for each observation.
`converged` | logical indicating whether the optimization routine converged.
`iter` | number of iterations performed
`y` |
`x` |

### Author(s)

Arnošt Komárek arnost.komarek[AT]mff.cuni.cz

### References

Agresti, A. (2002). Categorical Data Analysis. Second edition. Hoboken: John Wiley & Sons. Section 7.2.

### See Also

`glm`.

### Examples

    set.seed(1977)
    n <- 100
    x1 <- rbinom(n, 1, 0.4)
    x2 <- runif(n, 0, 1)
    eta <- 5 + 0.1*x1 -0.2*x2
    mu <-  exp(eta)
    y <- rpois(n, mu)

    ### Fit the model using poisson
    Xmat <- data.frame(x1=x1, x2=x2)
    fit <- logpoisson(y=y, x=Xmat)
    summary(fit)

    ### Fit the model using standard glm
    fit0 <- glm(y~x1+x2, family=poisson(link="log"))
    summary(fit0)

[Package glmmAK version 1.3-1 Index]