| likTests | R Documentation |
GLARMA Fit
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.
likTests(object)
likeTests(object)
## S3 method for class 'likTests'
print(x, ...)
object |
An object of class |
x |
An object of class |
... |
Further arguments passed to or from other methods. |
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.
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.
"William T.M. Dunsmuir" <w.dunsmuir@unsw.edu.au>
### Binomial response
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)
### Negative binomial response
glarmamod <- glarma(y, X, thetaLags = c(1,2,5), type = "NegBin", method = "FS",
residuals = "Pearson", maxit = 100, grad = 2.22e-16)
glarmamod
summary(glarmamod)
likeTests(glarmamod)
### Negative Binomial Response with offset
glarmamod.offset <- glarma(y, X, thetaLags = c(1,2,5), type = "NegBin",
method = "FS", offset=log(X[,1]),
residuals = "Pearson", maxit = 100, grad = 2.22e-16)
glarmamod.offset
summary(glarmamod.offset)
likeTests(glarmamod.offset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.