benjann / coefplot

Stata module for plotting regression coefficients and other results
http://repec.sowi.unibe.ch/stata/coefplot/index.html
MIT License
12 stars 2 forks source link

Plotting interaction terms #1

Closed soyoungtot closed 3 years ago

soyoungtot commented 3 years ago

Hi, I'm running a regression with only interaction term(s). When I run the regression and plot estimates using coefplot, I don't get all coefficients. I've included a sample below. I'm particularly interested in knowing why 1#bc wouldn't show up in the plot.

use https://stats.idre.ucla.edu/stat/stata/examples/ara/duncan, clear

gen g1=1 if income <50
replace g1 = 0 if income >= 50
reg educ i.g1#i.occ_type
coefplot a1

image

I'm not sure if this is a bug or if I'm doing something wrong, however I stumbled on another user having basically the same issue here: https://www.statalist.org/forums/forum/general-stata-discussion/general/1480440-coefplot-omitting-a-factor-variable-interaction-coefficient.

soyoungtot commented 3 years ago

I resolved this issue using baseline option.