R/tvar1sim.R

Defines functions tvar1sim

Documented in tvar1sim

tvar1sim <-
function(sd=1){


n <- 512

arvec <- seq(from=0.9, to=-0.9, length=512)

x <- c(rnorm(1, mean=0, sd=sd), rep(0,n-1))




for(i in 2:n)
	x[i] <- arvec[i]*x[i-1] + rnorm(1, mean=0, sd=sd)

x

}

Try the locits package in your browser

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

locits documentation built on Sept. 8, 2023, 5:07 p.m.