R/AR.R

Defines functions AR

Documented in AR

AR <-
function(x, params = list(AR = list(p=1))){
 
  p = params$AR$p
  ar.ls <- pacf(x, plot = FALSE)$acf[1:p]
  
  x.sur <- arima.sim(model=list(ar = ar.ls), n = length(x))
  
  return(invisible(x.sur))
}

Try the WaveletComp package in your browser

Any scripts or data that you put into this service are public.

WaveletComp documentation built on May 2, 2019, 6:33 a.m.