I run the example included in the documentation of the nardl function in the nardl package
############################################
# Fit the nonlinear cointegrating autoregressive distributed lag model
############################################
# Load data
data(fod)
############################################
# example 1:auto selected lags (maxlags=TRUE)
############################################
reg<-nardl(food~inf,fod,ic="aic",maxlag = 4,graph = FALSE,case=3)
summary(reg)
I get Error in aa[[2]] : subscript out of bounds
Is this a bug or does it have to do with package version/R version?
I found the source of the error, although it is beyond my capabilities to understand why this is happening. I am using the package nardl_0.1.6 and R version 4.3.1. and I was still getting the error. Remember this is not my formula, but exactly the example in the nardl() function included in the nardl package.
The error comes about when both the nardl and the dLagM packages are uploaded in the same session. Perhaps the administrators of these packages could help?