Hi,
I am trying to use the new mediate command available in Stata 18 in combination with mi estimate but there is a bug I think.
My code is the following:
mi estimate, post cmdok: mediate (stx_ppvt_fin tenure_child_1 hhsize_child familyeduc_child lnincome33 scotland_child urban_child cog16 withpartner health_par female female_child mathage_par ncdsage_child tenure_par_1 hhsize_par familyeduc_par lnincome16 scotland urban_par) (n2 female female_child mathage_par tenure_par_1 hhsize_par familyeduc_par lnincome16 scotland urban_par)(n1, continuous(-0.905 4.08)), vce (cluster id)
When I try and run it, I keep on receiving error r(452) specifying that n1: factor variables may not contain noninteger values
r(452);
According to the mediate command, I specify that my treatment variable n1 is a continuous, rather than a factor variable. How can I solve this?
Thanks,
Laura
I am trying to use the new mediate command available in Stata 18 in combination with mi estimate but there is a bug I think.
My code is the following:
mi estimate, post cmdok: mediate (stx_ppvt_fin tenure_child_1 hhsize_child familyeduc_child lnincome33 scotland_child urban_child cog16 withpartner health_par female female_child mathage_par ncdsage_child tenure_par_1 hhsize_par familyeduc_par lnincome16 scotland urban_par) (n2 female female_child mathage_par tenure_par_1 hhsize_par familyeduc_par lnincome16 scotland urban_par)(n1, continuous(-0.905 4.08)), vce (cluster id)
When I try and run it, I keep on receiving error r(452) specifying that n1: factor variables may not contain noninteger values
r(452);
According to the mediate command, I specify that my treatment variable n1 is a continuous, rather than a factor variable. How can I solve this?
Thanks,
Laura