My issues is after running npregress and then getting the margins, at age 60 the confidence interval does not include the observed margin, and therefore when the marginsplot estimate is not included in the confidence interval. I am not sure how to interpret this or what might be that cause of this. Any help would be greatly appreciated.
Here is the code I use:
This produces the following output:
And this is the marginsplot:
Array
Here is the code I use:
Code:
npregress sin_rhis age_male sin_houseval sin_income sin_wealth i.ruralurban i.year if age_male >= 55 & married == 1, vce(bootstrap, reps(20) seed(12345)) margins, at(age_male=(55(5)85)) vce(bootstrap, reps(20) seed(12345)) marginsplot
Code:
Bandwidth -------------------------------------------------------- Mean Effect -------------------------------------------------------- age_male 3.582705 4.174322 sin_house~1 .3650728 .4253577 sin_income .4923634 .473668 sin_wealth 1.893532 2.206214 ruralurban .5 .5 year .5 .5 ------------------------------------------------------- Local-linear regression Number of obs = 1,930 Continuous kernel : epanechinikov E(Kernel obs) = 1,067 Discrete kernel : liracine R-squared = 0.4303 Bandwidth : cross validation --------------------------------------------------------------------------------------------------------------------------- Observed Bootstrap Percentile sin_his Estimate Std. Err. z P>|z| [95% Conf. Interval] ---------------------------------------------------------------------------------------------------------------------------- Mean sin_his 4.170998 .091423 45.62 0.000 4.021538 4.39628 ---------------------------------------------------------------------------------------------------------------------------- Effect age_male .0031461 .0151447 0.21 0.835 -0.0161455 .043843 sin_houseval .5560063 .2042004 2.72 0.006 .1498142 .955308 sin_income .9126953 .139012 6.57 0.000 .5755258 1.06808 ruralurban (1 vs 0) .5643983 .2591127 2.18 0.029 .2289176 1.19650 year (2006 vs 2004) .1407 .0932195 1.12 0.261 -.0276539 .28113 (2008 vs 2004) .1373666 .1297748 1.06 0.290 -.0908567 .34794 (2010 vs 2004) .1324337 .1848764 0.72 0.474 -.1323977 .444480 (2012 vs 2004) .0155138 .2434178 0.06 0.949 -.2770047 .568149 (2014 vs 2004) .0978844 .2750368 0.36 0.722 -.2280371 .715432 ----------------------------------------------------------------------------------------------------------------------------- Note: Effect estimates are average derivatives for continuous covariates and averages of contrasts for factor covariates Predictive margins Number of obs = 1,930 Replications = 20 Expression : mean function, predict() 1._at : age_male = 55 2._at : age_male = 60 3._at : age_male = 65 4._at : age_male = 70 5._at : age_male = 75 6._at : age_male = 80 7._at : age_male = 85 ------------------------------------------------------------------------------------------------------------ Observed Bootstrap Percentile Estimate Std. Err. z P>|z| [95% Conf. Interval] ------------------------------------------------------------------------------------------------------------ _at 1 2.571337 1.483309 1.73 0.083 -1.884745 4.613622 2 1.640986 .2610298 6.29 0.000 2.683658 3.85435 3 3.950541 .2305949 17.13 0.000 3.612271 5.578298 4 4.32619 .1695885 25.51 0.000 4.056366 4.799602 5 4.238917 .1592986 26.61 0.000 4.062757 4.607807 6 3.677414 .2698087 13.63 0.000 3.135992 4.281009 7 3.385679 .4588806 7.38 0.000 2.642715 4.627514 ------------------------------------------------------------------------------------------------------------
Array