As a test of randomisation / falsification I am simulating random assignment of observations to treatment group using the 'simulate' command. I have a couple of categorical variables in my list of controls. I ran the regressions with "i.name_of_categorical_variable" and it worked. But this doesn't seem to work when I run the same command with 'simulate'
My code for reference:
simulate coefpolicy_effect=r(coefpolicy_effect) tpolicy_effect= r(tpolicy_effect) ppolicy_effect= r(ppolicy_effect) sepolicy_effect=r(sepolicy_effect) r2=r(r2) N=r(N) , reps(1000): my_model FP2A policy_effect post_policy treated RO5 ED6 i.HHEDUC HHEDUCF HHEDUCM SPED6 NMARRIEDF NMARRIEDM NPERSONS NADULTS URBAN INCOME forward_caste religion IDPSU STDIST01
In the above code, the variable HHEDUC is a categorical variable, hence the i.HHEDUC in regression command.
Any suggestions on how to run simulate with categorical variables?
My code for reference:
simulate coefpolicy_effect=r(coefpolicy_effect) tpolicy_effect= r(tpolicy_effect) ppolicy_effect= r(ppolicy_effect) sepolicy_effect=r(sepolicy_effect) r2=r(r2) N=r(N) , reps(1000): my_model FP2A policy_effect post_policy treated RO5 ED6 i.HHEDUC HHEDUCF HHEDUCM SPED6 NMARRIEDF NMARRIEDM NPERSONS NADULTS URBAN INCOME forward_caste religion IDPSU STDIST01
In the above code, the variable HHEDUC is a categorical variable, hence the i.HHEDUC in regression command.
Any suggestions on how to run simulate with categorical variables?
Comment