R/simModel3.R

Defines functions simModel3

Documented in simModel3

#' Simulate an MA(1) model (Model #3)
#'
#' @param n  Length of the series to simulate
#' @param mean  Mean (theoretical) of the series
#' @param theta Coeffiecient of error a(t-1)
#' @param sderror Standard deviation of the error term
#'
#' @return A time series simulated from the MA(1) model
#'
#' @export
#'

simModel3=function(n=100,mean=0,theta=0.5,sderror=1){
  arima.sim(model=list(ma=theta),n=n,sd=sderror)+mean
}
statmanrobin/ts343AJ documentation built on May 23, 2022, 4:34 p.m.