Hello, everyone.
I faced the problem of running ivmediate with the cluster.
In ivreg2, I use the command :
ivreg2 Y (X=Z), first cluster(id_district)
where Y=outcome variable, X=variable of interest, Z=instrument variable.
Then I need to use a mediator variable to explain the transmission from X to Y, but I still need to add cluster(id_district) in the analysis.
While I'm running the command:
ivmediate Y, med(mediator_variable) treat(X) inst(Z) full, cluster(id_district)
But, it’s not working. Stata told it was an invalid 'cluster'.
Fyi, I'm using stata 17 for windows with official license.
Help me, please. I'm a newbie using this ivmediate command.
Thanks a lot.
Best regards,
Shah Lya
I faced the problem of running ivmediate with the cluster.
In ivreg2, I use the command :
ivreg2 Y (X=Z), first cluster(id_district)
where Y=outcome variable, X=variable of interest, Z=instrument variable.
Then I need to use a mediator variable to explain the transmission from X to Y, but I still need to add cluster(id_district) in the analysis.
While I'm running the command:
ivmediate Y, med(mediator_variable) treat(X) inst(Z) full, cluster(id_district)
But, it’s not working. Stata told it was an invalid 'cluster'.
Fyi, I'm using stata 17 for windows with official license.
Help me, please. I'm a newbie using this ivmediate command.
Thanks a lot.
Best regards,
Shah Lya
Comment