Learn R Programming

glarma (version 1.6-0)

likTests: Likelihood Ratio Test and Wald Test for GLARMA Fit

Description

Function to carry out the likelihood ratio and Wald tests of serial dependence when the alternative is a GLARMA process. This function takes a "glarma" object and uses its attributes to set up a GLM fit that matches the GLARMA model regression structure. This is done to ensure that the GLM object is the null hypothesis for testing against the "glarma" object.

Usage

likTests(object)
likeTests(object)
# S3 method for likTests
print(x, ...)

Arguments

object

An object of class "glarma", obtained from a call to glarma.

x

An object of class "likTests", a result of a call to likTests

...

Further arguments passed to or from other methods.

Value

likTests returns an object of class "likTests". A matrix is shown with the statistics and p-value for each test. The significance stars alongside help to identify any probabilities less than 0.05 or 0.01.

Details

This function carries out the likelihood ratio and Wald tests for comparing the null model and the alternative model.

likeTests is an alias for likTests.

Examples

Run this code
# NOT RUN {
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 = 2.22e-16)
likTests(glarmamod)
likeTests(glarmamod)
# }

Run the code above in your browser using DataLab