You have set m.sim=2 so you need a list of regressor matrices (the simulated values) of the same length i.e.
sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=list(sm,sm))

Regards,

Alexios


On 18/06/2015 14:55, Francesco Mantovani wrote:
Hello, I'm trying to simulate with ugarchsim a AR(3)-GARCH(1,1) process with 
external regressors in conditional mean.The external regressors I used in 
ugarchfit are 2 vectors, each of size 2920-by-1, namely sm[,1] and sm[,2]. I 
tried to include them into ugarchsim via mexsimdata, but I always get:

Error in .simregressors(model, mexsimdata, vexsimdata, N, n, m.sim, m) : 
ugarchsim-->error: mexsimdata should be a list of length m.sim
I tried to list them as well, but it does not work. I tried the following 
commands:
sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=(sm[,1],sm[,2]))sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=c(sm[,1],sm[,2]))
sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=list(c(sm[,1],sm[,2]))sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=as.list(sm[,1],sm[,2]))sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=as.list(c(sm[,1],sm[,2]))sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=sm[,1])
sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=c(list(sm[,1],sm[,2]))...etc.
Please help me out.Thank you for your kind cooperation and best regards

        [[alternative HTML version deleted]]

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to