I'm trying to get both the margins function and the marginsplot function to work with an MI dataset.
I have tried using the approach found here:
http://www.statalist.org/forums/foru...action-effects
I use the code:
mi estimate: regress stdsharevalue treatment##Canadian
generate TC = treatment*Canadian
pr bogus ,eclass
tempname b V sample
mat `b' = e(b)
mat `V' = e(V)
mat rown `b' = y
mat coln `b' = treatment Canadian i.treatment#i.Canadian _cons
mat rown `V' = treatment Canadian i.treatment#i.Canadian _cons
mat coln `V' = treatment Canadian i.treatment#i.Canadian _cons
g `sample' = e(sample)
eret post `b' `V' , e(`sample')
end
mi estimate: regress stdsharevalue treatment Canadian TC
bogus
margins ,dydx(Canadian)
However, I get this error after I use the bogus program:
conformability error
r(503);
Any insights as to why this is happening, or how to get around this would be appreciated.
I have tried using the approach found here:
http://www.statalist.org/forums/foru...action-effects
I use the code:
mi estimate: regress stdsharevalue treatment##Canadian
generate TC = treatment*Canadian
pr bogus ,eclass
tempname b V sample
mat `b' = e(b)
mat `V' = e(V)
mat rown `b' = y
mat coln `b' = treatment Canadian i.treatment#i.Canadian _cons
mat rown `V' = treatment Canadian i.treatment#i.Canadian _cons
mat coln `V' = treatment Canadian i.treatment#i.Canadian _cons
g `sample' = e(sample)
eret post `b' `V' , e(`sample')
end
mi estimate: regress stdsharevalue treatment Canadian TC
bogus
margins ,dydx(Canadian)
However, I get this error after I use the bogus program:
conformability error
r(503);
Any insights as to why this is happening, or how to get around this would be appreciated.
Comment