alexios alexios at 4dscape.com
Thu Jun 18 16:06:10 CEST 2015

You have set m.sim=2 so you need a list of regressor matrices (the 
simulated values) of the same length i.e.



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]]
> _______________________________________________
> R-SIG-Finance at r-project.org 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.

More information about the R-SIG-Finance mailing list