arfima.sim calls a function called IdentInvertQ that does some checking:
IdentInvertQ - Checks whether the model is identifiable, stationary, and invertible. Identifiability
is checked through the information matrix of all non-FGN components, as well as whether both
types of fractional noise are present, both seasonally and non-seasonally.
IdentInvertQ <-
function(phi = numeric(0), theta = numeric(0), phiseas = numeric(0), thetaseas = numeric(0), dfrac = numeric(0), dfs = numeric(0),
H = numeric(0), Hs = numeric(0), alpha = numeric(0), alphas = numeric(0), delta = numeric(0), period = 0, debug = FALSE, ident = TRUE) {
if(!(InvertibleQ(phi)&&InvertibleQ(theta)&&InvertibleQ(phiseas)&&InvertibleQ(thetaseas)&&InvertibleD(dfrac)&&InvertibleD(dfs)
&&InvertibleH(H)&&InvertibleH(Hs)&&InvertibleQ(delta)&&InvertibleAlpha(alpha)&&InvertibleAlpha(alphas))) {
if(debug) warning("Model is non-stationary or non-invertible")
return(FALSE)
}
if((length(H)+length(dfrac)+length(alpha)>1)||(length(Hs)+length(dfs)+length(alphas)>1)) {
if(debug) warning("Model is contains fractional d or H in either seasonal or non-seasonal components")
return(FALSE)
}
if(ident&&(length(phi)>0||length(theta)>0||length(phiseas)>0||length(thetaseas)>0||length(dfrac)>0||length(dfs)>0)) {
if(length(dfrac)>0) d <- T
else d <- F
if(length(dfs) > 0) dd <- T
else dd <- F
I <- iARFIMA(phi = phi, theta = theta, phiseas = phiseas, thetaseas = thetaseas, dfrac = d, dfs = dd, period = period)
if(!recdet(I)) {
if(debug) warning("Information matrix of SARMA or ARFIMA process is not positive definite")
return(FALSE)
}
}
TRUE
}
|