Computes the Phillips-Hansen (1990) Fully-Modified estimator for cointegrated regressions, using OLS for the first stage regression.
fm(y,
x,
type=c("const","trend","season","all"),
v=15,
ker_fun="parzen",
aband=0,
filter=0,
sb_start=0.15)
Coefficients table.
Variance-covariance matrix for the parameter estimates.
Standard error of the residuals.
Residual sum of squares.
The fitted values, or conditional mean, of the regression.
3x1 vector containing Hansen's (1992) Lc, MeanF, and SupF (in this order) statistics for testing the null hypothesis that the cointegrating vector is stable over the sample period.
Estimated residuals.
The data of dependent variable in a regression.
The data of independent variables in a regression.
The deterministic parts in the regression.
const = intercept;
trend = lnear trend;
season = seasonal dummies, this option requires ts format;
all = all three options, which requires ts format.
Number of autocovariance terms to compute the spectrum at frequency zero, default=15.
Set kernel function to one of the available kernels, default="parzen". See section details below.
Whether to use the automatic bandwidth selection.
aband=1. To use.
aband=0. Do not use.The default.
Whether to activate an AR(1) filter to compute the spectrum at frequency zero.
filter=1. To activate.
filter=0. Do not activate.The default.
The percentage specifies the beginning of sub-sample for stability test, and the end sample is (1-sb_start).
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
1. Available kernels. Technical details are referred to Brillinger (1981,P.55)
"parzen"=Parzen kernel
"bartlett"=Bartlett kernel
"dchlet"= Dirichlet kernel
"mdchlet"= Modified Dirichlet kernel
"tukham"=Tukey-Hamming kernel
"tukhan"=Tukey-Hanning kernel
"cauchy"=Cauchy kernel
"bohman"=Bohman kernel
"reisz"=Riesz,Bochner kernel
"gw"= Gauss-Weierstrass kernel
"qs"= Andrews (1991) Quadratic-Spectral
These kernels are written for FM procedures, technically different from those used in pp and kpss tests.
2. Andrews (1991) has developed data based (or automatic) bandwidth procedures for computing the spectrum. COINT implements these procedures for the Parzen, Bartlette, Tukey-Hamming, and the Quadratic-Spectral kernels. When aband is active, COINT ignores the value you specify for the band-width parameter and automatically substitutes the data-based value.
3. The aim of the AR(1) filter is to flatten the spectrum of residual around the zero frequency, thereby making it easier to estimate the true spectrum by simple averaging of the periodogram.
Andrews, D. W. K. (1991) Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation.Econometrica, 59: 817-858.
Brillinger, David R. (1981) Time Series Data Analysis and Theory. San Francisco, CA: Holden-Day.
Hansen, B. E. (1992) Tests for Parameter Instability in Regressions with I(1) Processes. Journal of Business and Economic Statistics, 10, 321-335.
Phillips, P. C. B. and Hansen B. E.(1990) Statistical Inference in Instrumental Variables Regression with I(1) Processes. Review of Economic Studies, 57, 99-125.
data(macro)
y=macro[,1]
x=macro[,-1]
out=fm(y,x,type=c("const","trend","season","all")[2],v=15,ker_fun="parzen")
out$coefTable
out$vcov
out$stests
tail(out$fit)
tail(out$resid)
Run the code above in your browser using DataLab