Dear all,
I came across the KHB method for mediation analysis. I have gone through the paper “Comparing coefficients of nested nonlinear probability models” but I couldn’t figure out (after trying many times) the command in the ordered outcome section which is as shown below:
. forv i = 1/3 { 2. quietly eststo: khb ologit edu fses || abil, outcome(`i´) ape > summary 3. }
. esttab, scalars("ratio_fses Conf.-Ratio" "pct_fses Conf.-Perc.")
I use an ordered logit as my dependent variable has 6 outcomes(which are educational levels) and I have a number of control variables too.
Dependent variable = isced1997_r
Independent variable= i.sl_hs045d2
Mediator= i.sl_cs010
Control variables = i.dn042, i.dn003, i.cs009, i.cs008.
I use this command:
. forv i = 1/6 { 2. quietly eststo: khb ologit isced1997_r i.sl_hs045d2 || i.sl_cs010, outcome(`i´) ape > summary 6. }
. esttab, scalars("ratio_ i.sl_hs045d2 Conf.-Ratio" "pct_ i.sl_hs045d2 Conf.-Perc.")
But get this message- program error: code follows on the same line as open brace
I will really appreciate your guidance on inputting this in Stata in order to get the analysis done. Many thanks.
Related Posts with KHB method for mediation analysis
High resolution graphs for publishingDear Users, I would like to ask you if do you know how to deal with graphs' resolution for scientif…
What fixed effects and cluster group to use on "three dimensional" panel data?Hello everyone, I have an (unbalacend) panel data set of German companies with investments in multi…
test for comparing two Poisson meansHi. I work with count data and the comparison of the two groups is the purpose of my study. My profe…
Marginsplot for selected categoriessolved …
Probit with Panel DataHi Everyone, I am using two waves of panel data to assess the impact of socio-demographic character…
Subscribe to:
Post Comments (Atom)
0 Response to KHB method for mediation analysis
Post a Comment