logLik.glarma: Extract Log-Likelihood from GLARMA Models

Description Usage Arguments Details Value See Also Examples

Description

logLik is a generic function which extracts the GLARMA model log-likelihood from objects returned by modeling functions.

Usage

1
2
## S3 method for class 'glarma'
logLik(object, deriv, ...)

Arguments

object

An object of class "glarma", a result of a call to glarma.

deriv

Numeric; either "0", "1" or "2". It is used to choose and extract the log-likehood, its derivative or its second derivative respectively from the "glarma" object. The default is "0".

...

Further arguments passed to or from other methods.

Details

This is an S3 generic function. logLik returns the log-likelihood, its derivative, or its second derivative from the object of class glarma based on the value of the argument deriv. "0" is for the log-likelihood, "1" is for the first derivative of log-likelihood and "2" is for the second derivative of the log-likelihood.

Value

The log-likelihood, the derivative of the log-likelihood or the second derivative of the log-likelihood extracted from the GLARMA model object object.

See Also

coef.glarma, residuals.glarma, fitted.glarma, glarma.

Examples

1
2
3
4
5
6
7
8
9
data(Polio)
Y <- Polio[, 2]
X <- as.matrix(Polio[, 3:8])
glarmamod <- glarma(Y, X, thetaLags = c(1, 2, 5), type = "Poi", method ="FS",
                    residuals = "Pearson", maxit = 100 , grad = 1e-6)

logLik(glarmamod, deriv = 0)
logLik(glarmamod, deriv = 1)
logLik(glarmamod, deriv = 2)

glarma documentation built on May 2, 2019, 6:33 a.m.