calc.residAR.Rd
計算はfit.SR
のout.AR
と同じであるが、AICcも見れるほか、fit.SRregime
にも対応している
fit.SRregime
の場合、各レジームの最初の年は初期値となる(つまり前のレジームの最後の年からの残差を引きずらない)
calc.residAR(
resSR,
per_regime = TRUE,
output = TRUE,
filename = "residARouter"
)
if (FALSE) { # \dontrun{
data(res_vpa)
SRdata <- get.SRdata(res_vpa)
data(res_vpa)
SRdata <- get.SRdata(res_vpa)
resSR <- fit.SR(SRdata, SR = c("HS","BH","RI")[1],
method = c("L1","L2")[1], AR = 0,
out.AR = FALSE)
resSR_post = calc.residAR(resSR)
resSR_post$AICc
resSR_post$pars
resSRregime <- fit.SRregime(SRdata, SR="HS", method="L2",
regime.year=c(1995,2005), regime.key=c(0,1,0),
regime.par = c("a","b","sd")[2:3])
resSRregime_post = calc.residAR(resSRregime, per_regime = TRUE)
resSRregime_post$AICc
resSRregime_post$regime$pars
} # }