All,
I am trying to plot coefficients for two regressions in the same plot. using the following code:
Code:
 coefplot  ( trad_W_all_emp_weeks, recast(connected) label(Employee_Mask) pstyle(p5)) ( trad_W_all_res_weeks, recast(connected) label(Resident_Mask) pstyle(p4)), rename( 2.week_from_opening_7_5_2_emp=2.week_from_opening_7_5_2  3.week_from_opening_7_5_2_emp=3.week_from_opening_7_5_2 4.week_from_opening_7_5_2_emp=4.week_from_opening_7_5_2// 5.week_from_opening_7_5_2_emp=5.week_from_opening_7_5_2 6.week_from_opening_7_5_2_emp=6.week_from_opening_7_5_2 7.week_from_opening_7_5_2_emp=7.week_from_opening_7_5_2// 8.week_from_opening_7_5_2_emp=8.week_from_opening_7_5_2 9.week_from_opening_7_5_2_emp=9.week_from_opening_7_5_2 10.week_from_opening_7_5_2_emp=10.week_from_opening_7_5_2// 11.week_from_opening_7_5_2_emp=11.week_from_opening_7_5_2) drop(_cons cases_normed_delay_14days 1.bus_policy_open_risk 1.rest_out_policy 1.home_policy  1.bar_policy_100//  1.bus_policy_open_mid// 0.bus_policy_open_risk 0.rest_out_policy 0.home_policy  0.bar_policy_100  0.bus_policy_open_mid residential workplaces transit_stations parks grocery_and_pharmacy// retail_and_recreation grocery_and_pharmacy_sq retail_and_recreation_sq parks_sq transit_stations_sq workplaces_sq  cases_normed_delay_14days_growth  cases_normed_delay_14days  )   //   graphregion(fcolor(gs15)) ciopts(recast(rcap)) yline(0, lcolor(red) lwidth(thin) ) ylabel(-.5(.25).5) yscale(range(-.5(.25).5)) vertical  xtitle("Weeks",size(small)) ylabel(,labsize(small)) xline(2, lcolor(red) lwidth(thin))// coeflabels(2.week_from_opening_7_5_2="-1" 3.week_from_opening_7_5_2="0" 4.week_from_opening_7_5_2="1" 5.week_from_opening_7_5_2="2" 6.week_from_opening_7_5_2="3" 7.week_from_opening_7_5_2="4" 8.week_from_opening_7_5_2="5" 9.week_from_opening_7_5_2="6" 10.week_from_opening_7_5_2="7" ) ytitle("Change in Covid-19 cases ",size(small)) title ("Effect of Resident and  Employee Mask Mand on Covid-19 confirmed cases per100k ",size(3))msymbol(d) noci
The graph shows two lines but one of them is shifted as below. I have the same number of values for both of them. When I plotted them separately the problem is disappeared. but when both together the problem arises again.
Array