isat
function as input and returns the coefficient path of the constant (and long-run equilibrium if 'lr' is specified) together with its approximate variance and standard errors. If mxfull
and mxbreak
are specified, then the function returns the coefficient path of the user-specified variable.
isatvar(x, lr=FALSE, conscorr=FALSE, effcorr=FALSE, mcor = 1, mxfull = NULL, mxbreak=NULL)
isat
functionisatvar
also returns the long-run equilibrium coefficient path with its variance and standard deviation. See Pretis (2015).lr=FALSE
: A Tx4 matrix (with T = number of observations) where the first column denotes the coefficient path relative to the full sample coefficient, the second column the coefficient path of the intercept, the third the approximate variance of the coefficient path, and the fourth column the approximate standard errors of the coefficient path. If lr=TRUE
: A Tx7 matrix where the first four columns are identical to the lr=FALSE
case, and the additional columns denote the long-run equilibrium coefficient path, together with the approximate variance and standard errors of the long-run equilibrium coefficient path.isat
. This permits hypothesis testing and plotting of approximate confidence intervals for the intercept in the presence of structural breaks. For dynamic autoregressive models in isat
the lr
argument returns the time-varying long-run equilibrium together with its approximate variance and standard errors. If mxfull
and mxbreak
are specified, then the function returns the coefficient path of the user-specified variable, where mxfull
denotes the ful-sample variable name, to which the mxbreak
variables are added. To correct for the under-estimation of the residual variance, the argument conscorr
implements the Johansen and Nielsen (2016) consistency correction, and effcorr
adds the efficiency correction for standard errors on fixed regressors which are not selected over.Pretis, F. (2015): 'Testing for time-varying predictive accuracy using bias-corrected indicator saturation'. Oxford Department of Economics ???orking Paper. Johansen, S., & Nielsen, B. (2016): 'Asymptotic theory of outlier detection algorithms for linear time series regression models.' Scandinavian Journal of Statistics, 43(2), 321-348.
isat
, coef.gets
, plot.gets
, biascorr
, isattest
##Variance in presence of a break
#nile <- as.zoo(Nile)
#isat.nile <- isat(nile, sis=TRUE, iis=FALSE, plot=FALSE, t.pval=0.005)
#var <- isatvar(isat.nile)
#plot(nile)
#lines(isat.nile$mean.fit, col="red")
#lines(isat.nile$mean.fit + 2*var$const.se, col="blue", lty=3)
#lines(isat.nile$mean.fit - 2*var$const.se, col="blue", lty=3)
##Variance when there is no break
#set.seed(1)
#x <- as.zoo(rnorm(100, 0, 1))
#isat.x <- isat(x, sis=TRUE, iis=FALSE, plot=TRUE, t.pval=0.005)
#var.x <- isatvar(isat.x)
#plot(x)
#lines(isat.x$mean.fit, col="red")
#lines(isat.x$mean.fit + 2*var.x[,2], col="blue", lty=3)
#lines(isat.x$mean.fit - 2*var.x[,2], col="blue", lty=3)
##Variance of the long-run equilibrium coefficient path
#nile <- as.zoo(Nile)
#isat.nile <- isat(nile, sis=TRUE, iis=FALSE, plot=TRUE, t.pval=0.005, ar=1:2)
#var <- isatvar(isat.nile, lr=TRUE)
Run the code above in your browser using DataLab