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
Installing Stata Scheme on Offline ComputerHi, I'm trying to install the 538 scheme ("g538schemes") onto an offline computer that I'm not able …
Fractional Heteroskedastic probitI have a fractional dependent variable and I am using a fractional heteroskedastic probit model. How…
interaction term with quadratic term?1) Y= X1+ X1*X1+X2 + X1*X2 + (X2)*(X1*X1) i.e. adding not only the interaction with the low level X1…
Independent variable is omitted due to collinearity when using xtabond2 commandI ran the xtabond2 command using Stata 11 and got all the results needed for different models. I sav…
Margins command error: at values for factor wavefirst do not sum to 1Hi. I am using a dynamic random effects model to study the effect of health insurance on self-employ…
Subscribe to:
Post Comments (Atom)
0 Response to Mimrgns
Post a Comment