I create a function with parameters.
arma_function<-function(y,param){ param<-c("c","phi","theta") as.numeric(factor(p