random_arcoefs function

Create random AR coefficients

Create random AR coefficients

random_arcoefs generates random AR coefficients.

random_arcoefs(p, forcestat = FALSE, sd = 0.6/p)

Arguments

  • p: a positive integer specifying the autoregressive order of the model.
  • forcestat: use the algorithm by Monahan (1984) to force stationarity on the AR parameters (slower)?
  • sd: if forcestat==FALSE, then AR parameters are drawn from zero mean normal distribution with sd given by this parameter.

Returns

Returns px1px1 vector containing random AR coefficients.

Details

If forcestat==TRUE, then the AR coefficients are relatively large, otherwise they are usually relatively small.

References

  • Monahan J.F. 1984. A Note on Enforcing Stationarity in Autoregressive-Moving Average Models. Biometrica 71 , 403-404.
  • Maintainer: Savi Virolainen
  • License: GPL-3
  • Last published: 2025-04-07

Useful links