rcAR function

Estimating of Random-Coefficient AR Models

Estimating of Random-Coefficient AR Models

Estimate random-coefficient AR models.

rcAR(x, lags = c(1), include.mean = TRUE)

Arguments

  • x: a time series of data.
  • lags: the lag of AR models. This is more flexible than using order. It can skip unnecessary lags.
  • include.mean: a logical value indicating whether the constant terms are included.

Returns

rcAR function returns a list with following components: - par: estimated parameters.

  • se.est: standard errors.

  • residuals: residuals.

  • sresiduals: standardized residuals.

Examples

t=50 x=rnorm(t) phi1=matrix(0.4,t,1) for (i in 2:t){ phi1[i]=0.7*phi1[i-1]+rnorm(1,0,0.1) x[i]=phi1[i]*x[i-1]+rnorm(1) } est=rcAR(x,1,FALSE)
  • Maintainer: Xialu Liu
  • License: GPL (>= 2)
  • Last published: 2023-09-24

Useful links