# NOT RUN {
# GMAR model
fit12 <- fitGSMAR(simudata, p=1, M=2, model="GMAR")
qrt <- quantileResidualTests(fit12, lagsAC=c(1, 5, 10, 15))
# G-StMAR model
fit42g <- fitGSMAR(T10Y1Y, 4, M=c(1, 1), model="G-StMAR")
qrtest42g <- quantileResidualTests(fit42g)
plot(qrtest42g)
# Restricted GMAR model
fit43gmr <- fitGSMAR(T10Y1Y, 4, 3, model="GMAR", restricted=TRUE)
qrtest43gmr <- quantileResidualTests(fit43gmr, lagsAC=1:10)
plot(qrtest43gmr)
# Non-mixture version of StMAR model
fit101t <- fitGSMAR(T10Y1Y, 10, 1, model="StMAR", ncores=1, ncalls=1)
quantileResidualTests(fit101t, lagsAC=c(1, 2, 5), printRes=FALSE)
# Two-regime GMAR p=2 model with the second AR coeffiecient of
# of the second regime contrained to zero.
constraints <- list(diag(1, ncol=2, nrow=2), as.matrix(c(1, 0)))
fit22c <- fitGSMAR(T10Y1Y, 2, 2, constraints=constraints)
quantileResidualTests(fit22c, lagsAC=c(1, 3), printRes=FALSE)
# }
Run the code above in your browser using DataLab