Learn R Programming

dynamac (version 0.1.4)

dynardl.auto.correlated: Run a variety of autocorrelation tests on the residuals from a dynardl model.

Description

Run a variety of autocorrelation tests on the residuals from a dynardl model.

Usage

dynardl.auto.correlated(x, bg.type = "Chisq", digits = 3, order = NULL,
  object.out = FALSE)

Arguments

x

a dynardl model

bg.type

a character string for the type of Breusch-Godfrey test to run. The default is Chisq: the Chisq test statistic. The other option is F: the F-test statistic.

digits

the number of digits to round to when showing output. We recommend three.

order

the maximum order of serial autocorrelation to test when executing the Breusch-Godfrey test.

object.out

if TRUE, and dynardl.auto.correlated is assigned to an object, the AIC, BIC, and results will be stored for the user's convenience.

Value

The results of autocorrelation tests.

Details

This is a simple and convenient way to test whether the residuals from the dynardl model are white noise. As an aside, this is also why dynardl has a simulate = FALSE argument: users can ensure the model is white noise residuals before estimating a potentially time-intensive simulation. The output also reminds the user of the null hypotheses for the autocorrelation tests.

Examples

Run this code
# NOT RUN {
# Using the ineq data from dynamac
ardl.model <- dynardl(concern ~ incshare10 + urate, data = ineq, 
       lags = list("concern" = 1, "incshare10" = 1),
       diffs = c("incshare10", "urate"), 
       lagdiffs = list("concern" = 1),
       ec = TRUE, simulate = FALSE)
dynardl.auto.correlated(ardl.model)
# }

Run the code above in your browser using DataLab