sysuse uslifeexp, clear mkspline2 sp_year = year, cubic nknots(3) qui reg le sp_year* if year != 1918 adjustrcspline, /// addplot(scatter le year if year != 1918, msymbol(Oh)|| /// scatter le year if year == 1918, msymbol(X)) /// name(pred, replace) /// title("expected life expectancy in the US") mfxrcspline, /// name(mfx, replace) /// ylab(0(.1).5) /// title("trend in life expectancy in the US") graph combine pred mfx, /// ysize(3) /// note("excluding 1918 due to the Spanish flu pandemic")