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
Related Posts with Bootstraping after "mi estimate, cmdok: sureg"
Create new variable based on other variablesI have a data set on gross income and I'm trying to display the percent of total gross income (in a …
numeric format & changed valueI am using ver.15 and created ID from PIDM (to convert ID to string). The PIDM column is %10.0g. How…
Adding percentages to bars in an histogramDear Statalisters I want to create an histogram representing the percentages corresponding to each …
memory usage errorHello, I am a habitual Stata/SE 15.1 user. Today when opening a large dataset I received an insuffi…
Question about the hypothesized mean in a t-testDear all in Statalist, I want to perform a t-test for a hypothesized mean of, for instance, +/-2. I…
Subscribe to:
Post Comments (Atom)
0 Response to Bootstraping after "mi estimate, cmdok: sureg"
Post a Comment