search for: syntdata

Displaying 1 result from an estimated 1 matches for "syntdata".

Did you mean: syncdata
2007 Jul 16
1
question about ar1 time series
...ries <- function(ar1_length, rho1, var_serie) { if( (var_serie <= 0) || rho1 <= -1 || rho1 >= 1 ) stop("The variance of the serie should be > 0, or the rho1 parameter should be between (-1, 1) for that the serie can be stationary, be careful with this, bye. \n") syntdata <- rep(0, ar1_length) #af = adjustement factor, i.e. for that the var of random numbers = var of white noise (check the manual of runif) af <- sqrt( 3 * var_serie * (1 - rho1) * (1 + rho1) ) x0 <- runif(1, -af, af) syntdata[1] <- spinup(x0, rho1, af) fo...