I have written the following program
Code:
program define myprog1 replace pseudoclass = irecode(runiform(),prob_1, prob_1 + prob_2, prob_1 + prob_2 + prob_3) reg dep_var i.trial##i.pseudoclass margins i.trial, at(pseudoclass=(1(1)3)) end
However, I can not see in the margins help file how to refer to the prdicted values.
If I run e.g.
Code:
simulate _se _b, reps(100): myprog1
However, If I run something like
Code:
simulate _margins, reps(100): myprog1
at values for factor pseudoclass do not sum to 1
an error occurred when simulate executed myprog1
an error occurred when simulate executed myprog1
Can anyone help me with retriving the predicted values.
Many Thanks
0 Response to Saving margins results in a program to use it in simulate
Post a Comment