| Type: | Package | 
| Title: | Bootstrap Prediction Intervals and Bias-Corrected Forecasting | 
| Version: | 1.0 | 
| Date: | 2023-08-31 | 
| Author: | Jae. H. Kim <jaekim8080@gmail.com> | 
| Maintainer: | Jae H. Kim <jaekim8080@gmail.com> | 
| Description: | Contains functions for bias-Corrected Forecasting and Bootstrap Prediction Intervals for Autoregressive Time Series. | 
| License: | GPL-2 | 
| NeedsCompilation: | no | 
| Packaged: | 2023-08-31 08:26:27 UTC; jh808 | 
| Repository: | CRAN | 
| Date/Publication: | 2023-08-31 08:40:05 UTC | 
Bootstrap Prediction Intervals and Bias-Corrected Forecasting
Description
The package provides alternative bias-correction methods for univariate autoregressive model parameters; and generate point forecats and prediction intervals for economic time series.
A future version will include the case of vector AR models.
Details
| Package: | BootPR | 
| Type: | Package | 
| Version: | 1.0 | 
| Date: | 2023-08-31 | 
| License: | GPL version 2 or newer | 
Author(s)
Jae H. Kim
Maintainer: Jae H. Kim <J.Kim@latrobe.edu.au>
AR model order selection
Description
AR model selection using AIC, BIC, HQ
Usage
ARorder(x, pmax, type)
Arguments
| x | a time series data set | 
| pmax | the maximum AR order | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
Value
| ARorder | AR orders selected by AIC, BIC and HQ | 
| Criteria | the values of AIC, BIC and HQ | 
Author(s)
Jae H. Kim
Examples
data(IPdata)
ARorder(IPdata,pmax=12,type="const+trend")Andrews-Chen median-unbiased estimation for AR models
Description
This function returns the Andrews-Chen estimates for AR coefficients, residuals, and AR forecasts generated using the Andrews-Chen estimates
Usage
Andrews.Chen(x, p, h, type)
Arguments
| x | a time series data set | 
| p | AR order | 
| h | the number of forecast periods | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
Value
| coef | Andrews-Chen median-unbiased estimates | 
| ecm.coef | the coefficients in the ADF form | 
| resid | residuals | 
| forecast | point forecasts from Andrews-Chen estimates | 
Note
The Andrew-Chen estimator may break down when the AR order is very high. I recommend that AR order be kept low
Author(s)
Jae H. Kim
References
Kim, J.H., 2003, Forecasting Autoregressive Time Series with Bias-Corrected Parameter Estimators, International Journal of Forecasting, 19, 493-502.
Andrews, D.W. K. (1993). Exactly median-unbiased estimation of first order autoregressive / unit root models. Econometrica, 61, 139-165.
Andrews, D.W. K., & Chen, H. -Y. (1994). Approximate median unbiased estimation of autoregressive models. Journal of Business & Economic Statistics, 12, 187-204.
Examples
data(IPdata)
BootBC(IPdata,p=1,h=10,nboot=200,type="const+trend")
Bootstrap-after-Bootstrap Prediction
Description
This function calculates bootstrap-after-bootstrap prediction intervals and bootstrap bias-corrected point forecasts
Usage
BootAfterBootPI(x, p, h, nboot, prob, type)
Arguments
| x | a time series data set | 
| p | AR order | 
| h | the number of forecast periods | 
| nboot | number of bootstrap iterations | 
| prob | a vector of probabilities | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
Value
| PI | prediction intervals | 
| forecast | bias-corrected point forecasts | 
Author(s)
Jae H. Kim
References
Kim, J.H., 2001, Bootstrap-after-Bootstrap Prediction Intervals for Autoregressive Models, Journal of Business & Economic Statistics 19, 117-128
Kilian, L. (1998). Small sample confidence intervals for impulse response functions. The Review of Economics and Statistics, 80,218-230.
Examples
data(IPdata)
BootAfterBootPI(IPdata,p=1,h=10,nboot=100,prob=c(0.05,0.95),type="const+trend")
Bootstrap bias-corrected estimation and forecasting for AR models
Description
This function returns bias-corrected parameter estimates and forecasts for univariate AR models.
Usage
BootBC(x, p, h, nboot, type)
Arguments
| x | a time series data set | 
| p | AR order | 
| h | the number of forecast period | 
| nboot | number of bootstrap iterations | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
Value
| coef | Bootstrap bias-corrected parameter estimates | 
| resid | residuals | 
| forecast | point forecasts from bootstrap bias-corrected parameter estimates | 
Author(s)
Jae H. Kim
References
Kim, J.H., 2003, Forecasting Autoregressive Time Series with Bias-Corrected Parameter Estimators, International Journal of Forecasting, 19, 493-502.
Kilian, L. (1998a). Small sample confidence intervals for impulse response functions. The Review of Economics and Statistics, 80,218-230.
Examples
data(IPdata)
BootBC(IPdata,p=1,h=10,nboot=100,type="const+trend")
Bootstrap prediction intevals and point forecasts with no bias-correction
Description
This function returns bootstrap forecasts and prediction intervals with no bias-correction
Usage
BootPI(x, p, h, nboot, prob, type)
Arguments
| x | a time series data set | 
| p | AR order | 
| h | the number of forecast periods | 
| nboot | number of bootstrap iterations | 
| prob | a vector of probabilities | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
Value
| PI | prediction intervals | 
| forecast | bias-corrected point forecasts | 
Author(s)
Jae H. Kim
References
Thombs, L. A., & Schucany, W. R. (1990). Bootstrap prediction intervals for autoregression. Journal of the American Statistical Association, 85, 486-492.
Examples
data(IPdata)
BootPI(IPdata,p=1,h=10,nboot=100,prob=c(0.05,0.95),type="const+trend")
US industrial production data
Description
From Extended Nelson-Plosser data set, annua1, 1860-1988
Usage
data(IPdata)References
Andrews, D.W. K., & Chen, H. -Y. (1994). Approximate median-unbiased estimation of autoregressive models. Journal of Business & Economic Statistics, 12, 187-204.
Examples
data(IPdata)
OLS parameter estimates and forecasts, no bias-correction
Description
The function returns parameter estimates and forecasts from OLS estimation for AR models
Usage
LS.AR(x, p, h, type, prob)
Arguments
| x | a time series data set | 
| p | AR order | 
| h | the number of forecast period | 
| prob | a vector of probabilities | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
Value
| coef | OLS parameter estimates | 
| resid | OLS residuals | 
| forecast | point forecasts from OLS parameter estimates | 
| PI | Prediction Intervals based on OLS parameter estimates based on normal approximation | 
Author(s)
Jae H. Kim
Examples
data(IPdata)
LS.AR(IPdata,p=6,h=10,type="const+trend", prob=c(0.05,0.95))
Plotting point forecasts
Description
The function returns plots the point forecasts
Usage
Plot.Fore(x, fore, start, end, frequency)
Arguments
| x | a time series data set | 
| fore | point forecasts | 
| start | starting date | 
| end | ending date | 
| frequency | data frequency | 
Details
frequency=1 for annual data, 4 for quarterly data, 12 for monthly data
start=c(1980,4) indicates April 1980 if frequency=12
end = c(2000,1) indicates 1st quarter of 2000 if freqeuncy = 4
Value
plot
Author(s)
Jae H. Kim
Examples
data(IPdata)
BootF <- BootBC(IPdata,p=1,h=10,nboot=100,type="const+trend")
Plot.Fore(IPdata,BootF$forecast,start=1860,end=1988,frequency=1)
Plotting prediction intervals and point forecasts
Description
The function returns plots the point forecasts and prediction intervals
Usage
Plot.PI(x, fore, Interval, start, end, frequency)
Arguments
| x | a time series data set | 
| fore | point forecasts | 
| Interval | Prediction Intervals | 
| start | starting date | 
| end | ending date | 
| frequency | data frequency | 
Details
frequency=1 for annual data, 4 for quarterly data, 12 for monthly data
start=c(1980,4) indicates April 1980 if frequency=12
end = c(2000,1) indicates 1st quarter of 2000 if freqeuncy = 4
Value
plot
Author(s)
Jae H. Kim
Examples
data(IPdata)
PI <- ShamanStine.PI(IPdata,p=1,h=10,nboot=100,prob=c(0.025,0.05,0.95,0.975),type="const+trend",0)
Plot.PI(IPdata,PI$forecast,PI$PI,start=1860,end=1988,frequency=1)
Roy-Fuller median-unbiased estimation
Description
This function returns parameter estimates and forecasts based on Roy-Fuller medin-unbiased estimator for AR models
Usage
Roy.Fuller(x, p, h, type)
Arguments
| x | a time series data set | 
| p | AR order | 
| h | the number of forecast period | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
Value
| coef | Roy-Fuller parameter estimates | 
| resid | residuals | 
| forecast | point forecasts from Roy-Fuller parameter estimates | 
Author(s)
Jae H. Kim
References
Kim, J.H., 2003, Forecasting Autoregressive Time Series with Bias-Corrected Parameter Estimators, International Journal of Forecasting, 19, 493-502.
Roy, A., & Fuller, W. A. (2001). Estimation for autoregressive time series with a root near one. Journal of Business & Economic Statistics, 19(4), 482-493.
Examples
data(IPdata)
Roy.Fuller(IPdata,p=6,h=10,type="const+trend")
Bootstrap prediction interval using Shaman and Stine bias formula
Description
The function returns bias-corrected forecasts and bootstrap prediction intervals using Shaman and Stine bias formula for univariate AR models
Usage
ShamanStine.PI(x, p, h, nboot, prob, type, pmax)
Arguments
| x | a time series data set | 
| p | AR order | 
| h | the number of forecast periods | 
| nboot | number of bootstrap iterations | 
| prob | a vector of probability values | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
| pmax | for exogenous lag order algorithm, pmax = 0, for endogenous lag order algorithm, pmax is an integer greater than 0 | 
Value
| PI | prediction intervals | 
| forecast | bias-corrected point forecasts | 
Author(s)
Jae H. Kim
References
Kim, J.H., 2004, Bootstrap Prediction Intervals for Autoregression using Asymptotically Mean-Unbiased Parameter Estimators, International Journal of Forecasting, 20, 85-97.
Kim, J.H., 2003, Forecasting Autoregressive Time Series with Bias-Corrected Parameter Estimators, International Journal of Forecasting, 19, 493-502.
Shaman, P., & Stine, R. A. (1988). The bias of autoregressive coefficient estimators. Journal of the American Statistical Association, 83, 842-848.
Stine, R. A., & Shaman, P. (1989). A fixed point characterization for bias of autoregressive estimators. The Annals of Statistics,17, 1275-1284.
Kilian, L. (1998a). Small sample confidence intervals for impulse response functions. The Review of Economics and Statistics, 80,218-230.
Examples
data(IPdata)
ShamanStine.PI(IPdata,p=1,h=10,nboot=100,prob=c(0.05,0.95),type="const+trend",pmax=0)
bias-corrected estimation based on Shaman-Stine formula
Description
The function returns parameter estimates and bias-corrected forecasts using Shaman and Stine bias formula for univariate AR models
Usage
Stine.Shaman(x, p, h, type)
Arguments
| x | a time series data set | 
| p | AR order | 
| h | the number of forecast period | 
| type | "const" for the AR model with intercept only, "const+trend" for the AR model with intercept and trend | 
Value
| coef | Bias-corrected parameter estimates using Shama-Stine formula | 
| resid | residuals | 
| forecast | point forecasts from bias-corrected parameter estimates | 
Author(s)
Jae H. Kim
References
Kim, J.H., 2003, Forecasting Autoregressive Time Series with Bias-Corrected Parameter Estimators, International Journal of Forecasting, 19, 493-502.
Shaman, P., & Stine, R. A. (1988). The bias of autoregressive coefficient estimators. Journal of the American Statistical Association, 83, 842-848.
Stine, R. A., & Shaman, P. (1989). A fixed point characterization for bias of autoregressive estimators. The Annals of Statistics,17, 1275-1284.
Kilian, L. (1998a). Small sample confidence intervals for impulse response functions. The Review of Economics and Statistics, 80,218-230.
Examples
data(IPdata)
Stine.Shaman(IPdata,p=6,h=10,type="const+trend")