Hi,
after generating from a normal distribution a vector of random variables I solve a model. Now I need to replicate the generation and the resulting model 20000 times. how can I do?
Thanks for your help
Diana
replicas model
Re: replicas model
Hi Diana
You can use a loop to do this:
Cheers
Renger
You can use a loop to do this:
Code: Select all
set l Loops /l1*l20000/;
parameter results(l,*);
loop(l,
assign the random variable
solve your model
save the results in results(l,*) results(l,"MyResult") = X.L;
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Re: replicas model
Thank you for reply!
I did as you said but the model generates the same random variables. So, I have a matrix with 20000 equal results. How can i make generate different variables for each l?
Thanks so much.
Diana
I did as you said but the model generates the same random variables. So, I have a matrix with 20000 equal results. How can i make generate different variables for each l?
Thanks so much.
Diana