|
|
Use DEFINE in Monte Carlo simulation |
|
Message/Author |
|
|
Hi, I am wondering if the DEFINE function can be used in Monte Carlo data generation procedure. I know that when I read external data, I could use DEFINE to have a interaction term. But in the step where simulated data sets are generated, can I use define function? In particular, my model is Yij = b0j + b1j*Xij + rij b0j = r00 + r01*Wj + r02*Gj + r03*Wj*Gj + u b1j= r10 + r11*Gj + u Can I use the following syntax to generate data? MONTECARLO: NAMES ARE y x w g ; WITHIN = x; BETWEEN = g w; REPSAVE = ALL; SAVE = rep*.dat; Define: prod = g * w; MODEL POPULATION: %WITHIN% x@1; s | y ON x; y*.5; %BETWEEN% g@1; w@1; y ON g*.3 w*.3 prod*.3 ; s ON g*.3; [ y*0 s*.3]; Thank you very much for your response! Zack |
|
|
The DEFINE command can be used only with external Monte Carlo where the data sets are saved in the first step and analyzed in the second step. See Example 11.6. |
|
Back to top |
|
|