Hi
I'am trying to obtain margins after MI estimate and test differences between each slopes by a group . I have read that we need to use mimrgns. however after a piecewise mixed model I don't know how to do that. I have a code to do that just for non imputed data. See below. I replace "margins" by "mimrgns" but the saving option is not compatible. how can I obtain all estimates in order to plot the graph???
thanks a lot
carole
forvalues t = 1/5 {
local at`t'
forvalues i = 1/4 {
summ time`i' if Time == `t', meanonly
local at`t' `at`t'' time`i' = `r(mean)'
}
display "at(`at`t'')"
}
tempfile results
margins porteur, at(`at1') at(`at2') at(`at3') at(`at4') at(`at5') saving(`results')
use `results', clear
keep _m1 _at _margin _ci*
rename _margin dep
rename _at time
reshape wide dep _ci*, i(time) j(_m1)
label var dep0 "Non-porteur"
label var dep1 "Porteur"
graph twoway (connect dep* time) (rcap _ci_lb0 _ci_ub0 time, legend(off)) ///
(rcap _ci_lb1 _ci_ub1 time, legend(off))
Related Posts with Mimrgns
Variable label in generate?Dear All, I'd like to confirm whether there is any syntax that would allow me to prescribe variable…
Leave out 90th percentileI am using a census dataset which has these following variables: county industry income I know…
Can I do a OLS Regression if the distribution of my DV is like this?The dependent variable is the proportion of the ** time / *** time. Because this is a proportion, th…
95% Confidence Interval for relative concentration indexHello I would like to calculate 95% CI of relative concentration index. However, I could not find a…
Loop of different files using captureHello Statalisters I am running a loop over several files, like: Code: local originals "/Users/on…
Subscribe to:
Post Comments (Atom)
0 Response to Mimrgns
Post a Comment