resVar | R Documentation |
Extracts the global and regime-dependent variance of the residuals
resVar(x, adj=c("OLS", "ML"))
x |
setar object |
adj |
Degrees of freedom adjustment for the variance |
The degree of freedom adjustment in the formula for the variance is the number of parameters when adj="OLS"
or zero when adj="ML"
.
A vector containing:
Total |
The residual variance of the full sample |
L , (M) , H |
The residual variance of the lower (L), middle (if two thresholds) (M) and higher (H) regimes |
Matthieu Stigler
Non-Linear Time Series: A Dynamical Systems Approach, Tong, H., Oxford: Oxford University Press (1990).
#Lynx model as in Tong (1980, p. 387)
mod.setar <- setar(log10(lynx), mL=7,mH=2, thDelay=1, th=3.116)
summary(mod.setar)
#coefficients are same for lower regime but differ for higer
resVar(mod.setar, adj="ML")
#variance or the residuals is same for lower regime but differ for higer regime and hence for total
#Lynx model as in Tong (1980, p. 405)
mod.setar2 <- setar(log10(lynx), mL=1,mM=7,mH=2, thDelay=1, nthresh=2,th=c(2.373, 3.154))
round(coefficients(mod.setar2),3)
resVar(mod.setar2, adj="ML")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.