Description Usage Arguments Value References Examples
Gives bias-corrected estimates and 95% confidence intervals for autoregressive coefficients of AR(1) and AR(2) processes, for sample sizes n=10,11, ..., 50.
1 2 3 4 5 6 7 |
phi |
single value (AR1) or two-dimensional vector (AR2) containing the AR estimates subject to bias correction. Not required
if time series |
n |
integer for the length of the time series. Needs to be between 10 and 50. Not required
if time series |
method |
Character string specifying the method used to estimate the autoregressive
coefficients. Needs to be either |
order |
order of the estimated autoregressive process. |
x |
The time series to be fitted by AR(1) or AR(2) in which |
A list with the following elements
phi.hat
The original estimates of the AR coefficients
phi.correct
The bias-corrected estimates
ci.hat
The 95% confidence interval for the original estimates
ci.correct
The 95% confidence interval for the bias-corrected estimates
Sørbye, S. H., Nicolau, P. G. & Rue, H. (2021). Finite sample properties of estimators for first and second order autoregressive processes.
1 2 3 4 5 6 7 8 | # pre-computed estimates
biascorrect(phi=c(0.5,-0.2), n=15, method="mle")
# simulating series with ARIMA sim
series <- arima.sim(n = 20, list(ar = c(0.2, 0.5), sd = sqrt(0.04)))
biascorrect(x=series, order=2, method="mle")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.