Dear All,
I come across an error when using the 'coefplot' command.
I want to plot the coefficient of "aqi_mean_1hour" in the six regressions in one graph.Meanwhile, I want to place each coefficient’s confidence interval at a certain value on X axis.For example, I want to place the coefficient’s confidence interval of “aqi_mean_1hour”for the first regression (marked as A) at X=0.75
I type the following code, but it did not work. It still shows the default that it places coefficient’s confidence interval at the default values.
quietly eststo A:xi:reg joviality aqi_mean_1hour numerical_test1 memory_test1 logical_test1 memorylast_test1 rhu_mean_1h pre_1h_mean_1h vis_mean_1h windpower_mean_1h tigan_mean_1h i.weekend i.major i.religion_p i.gender age smoke milli_cost milli_income if airqualitypercep_4>3,robust
estimates store A
quietly eststo B:xi:reg selfassurance aqi_mean_1hour numerical_test1 memory_test1 logical_test1 memorylast_test1 rhu_mean_1h pre_1h_mean_1h vis_mean_1h windpower_mean_1h tigan_mean_1h i.weekend i.major i.religion_p i.gender age smoke milli_cost milli_income if airqualitypercep_4>3,robust
estimates store B
quietly eststo C:xi:reg attentiveness aqi_mean_1hour numerical_test1 memory_test1 logical_test1 memorylast_test1 rhu_mean_1h pre_1h_mean_1h vis_mean_1h windpower_mean_1h tigan_mean_1h i.weekend i.major i.religion_p i.gender age smoke milli_cost milli_income if airqualitypercep_4>3,robust
estimates store C
quietly eststo D:xi:reg fear aqi_mean_1hour numerical_test1 memory_test1 logical_test1 memorylast_test1 rhu_mean_1h pre_1h_mean_1h vis_mean_1h windpower_mean_1h tigan_mean_1h i.weekend i.major i.religion_p i.gender age smoke milli_cost milli_income if airqualitypercep_4>3,robust
estimates store D
quietly eststo E:xi:reg hostility aqi_mean_1hour numerical_test1 memory_test1 logical_test1 memorylast_test1 rhu_mean_1h pre_1h_mean_1h vis_mean_1h windpower_mean_1h tigan_mean_1h i.weekend i.major i.religion_p i.gender age smoke milli_cost milli_income if airqualitypercep_4>3,robust
estimates store E
quietly eststo F:xi:reg guilt aqi_mean_1hour numerical_test1 memory_test1 logical_test1 memorylast_test1 rhu_mean_1h pre_1h_mean_1h vis_mean_1h windpower_mean_1h tigan_mean_1h i.weekend i.major i.religion_p i.gender age smoke milli_cost milli_income if airqualitypercep_4>3,robust
estimates store F
coefplot A || B || C|| D|| E|| F, keep(aqi_mean_1hour) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) bycoefs relocate (A.aqi_mean_1hour=0.75 B.aqi_mean_1hour=0.25 C.aqi_mean_1hour=0.15 D.aqi_mean_1hour=0.95 E.aqi_mean_1hour=1.5)
How to deal the problem?
Thank you very much!
Array
0 Response to How to place coefficient at a certain value in “coefplot”
Post a Comment