I am carrying the following regressions:
reg sav_finimp`wave' ib3.group##i.year savimp`wave'
margins 1.group##year, at (group=(1)) saving(m1, replace)
margins 2.group##year, at (group=(2)) saving(m2, replace)
margins 3.group##year, at (group=(3)) saving(m3, replace)
I would like to plot the three different marginal effects in a single plot but specify different plotoptions (for instance, different line colors) and different cioptions for each line. If I use plot#opt and ci#opt and it does not work. Can anyone help? This is what I have tried:
combomarginsplot m1 m2 m3, xdimension(year) title({bf:Probability to save on financial assets}, color(black) size(medsmall)) plotopts(lcolor("146 195 51") mfcolor("146 195 51") mcolor("146 195 51")) ciopt(lcolor("146 195 51")) ciopt(lcolor("200 0 0")) xtitle("Year", height(4.5)) legend(rows(1) order(4 "Bottom 50%" 5 "Middle 40%" 6 "Top 10%"))
Thanks a lot!
Related Posts with different plotopts with combomarginsplot
robust standard errors by two-way cluster-robustI want to calculate a two way cluster by robust standard error of a regression on stata I need the c…
Question about the command --tuples--Dear all, I get an error when I run the command --tuples--(SSC). sysuse auto,clear global m mpg rep…
Plot mean and standard deviation by time, for two groups on the same figureI am trying to plot the time series of mean and standard deviation of a variable, for 2 different gr…
Regressions with 'long'/panel data: misleading test statistics?Greetings, I'm running Stata 15.1 on a Mac OS and am currently working with Pew panel data. I belie…
Chamberlain Moment Conditions and endogenous X in dynamic Poisson modelHello good people, I am dealing with the following Linear Feedback Model: y_{it} = a*y_{it-1} + e…
Subscribe to:
Post Comments (Atom)
0 Response to different plotopts with combomarginsplot
Post a Comment