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

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

Hi Diana

You can use a loop to do this:

```
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;
```

Cheers

Renger

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