Hi there,
I am experiencing something strange and I am coming here to seek for advice. When I run the following code, I successfully get a plot of the margins:
logit timemammog i.immig##i.white ///
age children citizenship english yrsimmig married ///
education income area ///
healthstat insurance ///
if age>=45 & age<=75 ///
[pw=perweight], or
margins, at(immig=(0 1) white=(0 1))
marginsplot, title("Time for mammogram: Interaction between immigrant and white", span size(small))
graph export "$graph/Time for mammogram.pdf", replace
However, my variables yrsimmig and area are categorical, so when I add i. in front of each, the plots no longer work. Any ideas?
This is the slightly changed code:
logit timemammog i.immig##i.white ///
age children citizenship english i.yrsimmig married ///
education income i.area ///
healthstat insurance ///
if age>=45 & age<=75 ///
[pw=perweight], or
margins, at(immig=(0 1) white=(0 1))
marginsplot, title("Time for mammogram: Interaction between immigrant and white", span size(small))
graph export "$graph/Time for mammogram.pdf", replace
I am experiencing something strange and I am coming here to seek for advice. When I run the following code, I successfully get a plot of the margins:
logit timemammog i.immig##i.white ///
age children citizenship english yrsimmig married ///
education income area ///
healthstat insurance ///
if age>=45 & age<=75 ///
[pw=perweight], or
margins, at(immig=(0 1) white=(0 1))
marginsplot, title("Time for mammogram: Interaction between immigrant and white", span size(small))
graph export "$graph/Time for mammogram.pdf", replace
However, my variables yrsimmig and area are categorical, so when I add i. in front of each, the plots no longer work. Any ideas?
This is the slightly changed code:
logit timemammog i.immig##i.white ///
age children citizenship english i.yrsimmig married ///
education income i.area ///
healthstat insurance ///
if age>=45 & age<=75 ///
[pw=perweight], or
margins, at(immig=(0 1) white=(0 1))
marginsplot, title("Time for mammogram: Interaction between immigrant and white", span size(small))
graph export "$graph/Time for mammogram.pdf", replace
Comment