Hi Statalist,

I would like to test the significance of the indirect effect of multiple mediators. To obtain bootstrap standard errors and confidence intervals of the indirect effect, I used a re-adaptation of the instruction provided in UCLA (cf. webpage https://stats.idre.ucla.edu/stata/fa...tors-in-stata/), but kept recieving "invalid syntax error" message from stata. The syntax I used is as follows:

capture program drop bootmm
program bootmm, rclass
syntax [if] [in]
mi estimate, cmdok: sureg (AdjConMean_SEM EFI AdjConMean_Literacy AdjConMean_Gender AdjConMean_Presparty AdjConMean_Preseth) (AdjConMean_NAB AdjConMean_SEM EFI AdjConMean_Apathy AdjConMean_EDUC AdjConMean_Ngo_Civilso AdjConMean_Age)(GovPerformance AdjConMean_NAB AdjConMean_SEM EFI IQI Country_size GNI) if `in'
return scalar ind_eff = [AdjConMean_SEM]_b[EFI]*[AdjConMean_NAB]_b[AdjConMean_SEM]*[GovPerformance]_b[AdjConMean_NAB]
end

bootstrap r(ind_eff), bca reps(5000): bootmm

Could someone please help me with the correct syntax?

Best,
Ikenna