biascorrect: AR Bias Correction for short time series

Description Usage Arguments Value References Examples

View source: R/biascorrect.R

Description

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.

Usage

1
2
3
4
5
6
7
biascorrect(
  phi = NULL,
  n = NULL,
  method = c("yw", "mle", "burg", "cmle"),
  order = NULL,
  x = NULL
)

Arguments

phi

single value (AR1) or two-dimensional vector (AR2) containing the AR estimates subject to bias correction. Not required if time series x is used as input.

n

integer for the length of the time series. Needs to be between 10 and 50. Not required if time series x is used as input.

method

Character string specifying the method used to estimate the autoregressive coefficients. Needs to be either mle, cmle, burg or yw, specifying the exact MLE, the conditional MLE, Burg's method and the Yule-Walker solution, respectively.

order

order of the estimated autoregressive process. x is used as input.

x

The time series to be fitted by AR(1) or AR(2) in which order needs to be specified. The default estimation method is the exact MLE if none is specified.

Value

A list with the following elements

References

Sørbye, S. H., Nicolau, P. G. & Rue, H. (2021). Finite sample properties of estimators for first and second order autoregressive processes.

Examples

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")

pedrognicolau/ARbiascorrect-v1 documentation built on Feb. 28, 2021, 8:35 a.m.