ar1 <- list(c(0.5, -0.5), c(1.1, 0, -0.5))
ar12 <- list(0, c(-0.3, 0.1))
s = 12
rag <- new("raggedCoefS", a = ar1, as = ar12, s = s)
model <- new("MixARGaussian", prob = exampleModels$WL_A@prob, # c(0.5, 0.5)
scale = exampleModels$WL_A@scale, # c(5, 1)
arcoef = rag)
set.seed(1234)
y <- mixAR_sim(model, n = 100, init = rep(0, 24))
mixSARfit(y, model)
## fix the intercepts to zero
mixSARfit(y, model, est_shift = FALSE, tol = 10e-4)
Run the code above in your browser using DataLab