Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65044

analyzing mediation effect with a bootstrap

$
0
0
Hi everyone,

I'm trying to run a bootstrap to analyze whether a variable that is considered as endogenous mediates two independent variables. Since my DV is a censored variable with different censoring point, and the main equation is conditioned on a subset of data, I use the CMP ( conditional mixed process) approach by Roodman(2008) to estimate three equations jointly.
here is the model:

==========
cmp (MMM= IV1 IV2 IV3 CONTROL1 CONTROL2)
(DV = MMM IV1 IV2 IV3 CONTROL1 CONTROL2 AAA BBB)
(SELECT=CONTROL1 CONTROL2 CCC DDD),
ind($cmp_cont "cond(SELECT,cond(CENSOR1==1,$cmp_right,$cmp_c ont) ,$cmp_out)" $cmp_probit) nonrtol
===========


Now I want to see whether "MMM" mediates the effect of "IV1", "IV2" and "IV3" on "DV", and here is the syntax:

===============
capture program drop bootmm
program bootmm, rclass
syntax [if] [in]
cmp (MMM= IV1 IV2 IV3 CONTROL1 CONTROL2)
(DV = MMM IV1 IV2 IV3 CONTROL1 CONTROL2 AAA BBB)
(SELECT=CONTROL1 CONTROL2 CCC DDD),
ind($cmp_cont "cond(SELECT,cond(CENSOR1==1,$cmp_right,$cmp_c ont) ,$cmp_out)" $cmp_probit) nonrtol

return scalar ind_IV1 = [MMM]_b[IV1]*[DV]_b[MMM]
return scalar ind_IV2 = [MMM]_b[IV2]*[DV]_b[MMM]
return scalar ind_IV3 = [MMM]_b[IV3]*[DV]_b[MMM]

end

bootstrap r(ind_IV1) r(ind_IV2) r(ind_IV3), bca reps(1000) nodots: bootmm
============


I kept getting the error message as following:

"insufficient observations to compute jackknife standard errors
no results will be saved
r(2000);"


WHAT SHOULD I DO?


thanks,
Hannah

Viewing all articles
Browse latest Browse all 65044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>