Hi Everyone,
I am looking to plot a coefficient of a variable for a regression using panel data. Here is an example of relevant variables:
I am running one regression, but want to plot the coefficient of quantity as measured by 6 month intervals. For example, one point on the graph would be the coefficient of log_quantity for months 659 to 664, then 665 to 669, etc. For the graph, I would prefer to have the y-axis measure the coefficient value, and the x-axis measure time. I also do not mind if confidence intervals are included.
Here is an example of my coefplot code:
coefplot (interval1, label(1) lcolor(maroon) lwidth(thick)), keep(log_quantity) base vertical noci xlabel(1 "2014" 2 "2015" 3 "2016" 4 "2016" 5 "2018") yline(0) name(PriceResponse) xtitle(Time) ytitle(Coefficient of Log Qt)
How can I achieve this so each coefficient measurement represents one particular interval?
Thank you in advance!
I am looking to plot a coefficient of a variable for a regression using panel data. Here is an example of relevant variables:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(log_quantity log_price) int monthly 7.516082 2.3769064 659 8.087429 2.3010998 660 8.2177725 2.285712 661 8.421479 2.2828755 662 8.486928 2.2437243 663 8.64822 2.1839561 664 8.669524 2.1738276 665 8.874057 1.9249498 666 9.017177 1.921546 667 9.024445 1.920314 668 9.204823 1.91248 669 9.127684 1.9294425 670 9.32783 1.8838995 671 9.329835 1.8669082 672 9.331509 1.907229 673 end format %tm monthly
I am running one regression, but want to plot the coefficient of quantity as measured by 6 month intervals. For example, one point on the graph would be the coefficient of log_quantity for months 659 to 664, then 665 to 669, etc. For the graph, I would prefer to have the y-axis measure the coefficient value, and the x-axis measure time. I also do not mind if confidence intervals are included.
Here is an example of my coefplot code:
coefplot (interval1, label(1) lcolor(maroon) lwidth(thick)), keep(log_quantity) base vertical noci xlabel(1 "2014" 2 "2015" 3 "2016" 4 "2016" 5 "2018") yline(0) name(PriceResponse) xtitle(Time) ytitle(Coefficient of Log Qt)
How can I achieve this so each coefficient measurement represents one particular interval?
Thank you in advance!

Comment