Hi All,
I have a regression and I would like to plot the coefficients so that I can see how they change over time. My code is:
and I only want to plot where the output is "soft_drink_new#ym." The regression output also includes "ym" constant, and others. Because of the ease of plotting this vertically, I was trying to use
But STATA outputs:
I have attached a snippet of my data below, and am happy to provide any additional information as well.
Many thanks,
Jim
I have a regression and I would like to plot the coefficients so that I can see how they change over time. My code is:
Code:
reg rel_px soft_drink_new##ym if country=="Ireland" & test_include_prod==1 & year>=2015 , robust
Code:
coefplot, keep(soft_drink_new##ym) xline(0) vertical
Code:
(.: no coefficients found, all dropped, or none kept) (nothing to plot)
Many thanks,
Jim
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str21 prod float rel_px str7 country float ym "Allitems" .997 "Ireland" 648 "Allitems" 1.002 "Ireland" 649 "Allitems" 1.009 "Ireland" 650 "Allitems" 1.01 "Ireland" 651 "Allitems" 1.009 "Ireland" 652 "Allitems" 1.011 "Ireland" 653 "Allitems" 1.009 "Ireland" 654 "Allitems" 1.011 "Ireland" 655 "Allitems" 1.008 "Ireland" 656 "Allitems" 1.006 "Ireland" 657 "Allitems" 1.003 "Ireland" 658 "Allitems" .999 "Ireland" 659 "Allitems" .991 "Ireland" 660 "Allitems" .997 "Ireland" 661 "Allitems" 1.003 "Ireland" 662 "Allitems" 1.003 "Ireland" 663 "Allitems" 1.007 "Ireland" 664 "Allitems" 1.009 "Ireland" 665 "Allitems" 1.007 "Ireland" 666 "Allitems" 1.011 "Ireland" 667 "Allitems" 1.006 "Ireland" 668 "Allitems" 1.004 "Ireland" 669 "Allitems" 1.001 "Ireland" 670 "Allitems" 1 "Ireland" 671 "Allitems" .992 "Ireland" 672 "Allitems" .996 "Ireland" 673 "Allitems" 1 "Ireland" 674 "Allitems" 1.002 "Ireland" 675 "Allitems" 1.007 "Ireland" 676 "Allitems" 1.014 "Ireland" 677 "Allitems" 1.012 "Ireland" 678 "Allitems" 1.01 "Ireland" 679 "Allitems" 1.006 "Ireland" 680 "Allitems" 1.001 "Ireland" 681 "Allitems" 1 "Ireland" 682 "Allitems" 1 "Ireland" 683 "Allitems" .995 "Ireland" 684 "Allitems" 1.001 "Ireland" 685 "Allitems" 1.007 "Ireland" 686 "Allitems" 1.011 "Ireland" 687 "Allitems" 1.009 "Ireland" 688 "Allitems" 1.01 "Ireland" 689 "Allitems" 1.01 "Ireland" 690 "Allitems" 1.014 "Ireland" 691 "Allitems" 1.008 "Ireland" 692 "Allitems" 1.007 "Ireland" 693 "Allitems" 1.005 "Ireland" 694 "Allitems" 1.004 "Ireland" 695 "Allitems" .997 "Ireland" 696 "Allitems" 1.006 "Ireland" 697 "Allitems" 1.009 "Ireland" 698 "Allitems" 1.007 "Ireland" 699 "Allitems" 1.013 "Ireland" 700 "Allitems" 1.014 "Ireland" 701 "Allitems" 1.018 "Ireland" 702 "Allitems" 1.021 "Ireland" 703 "Allitems" 1.017 "Ireland" 704 "Allitems" 1.016 "Ireland" 705 "Allitems" 1.011 "Ireland" 706 "Allitems" 1.011 "Ireland" 707 "Allitems" 1.004 "Ireland" 708 "Allitems" 1.012 "Ireland" 709 "Allitems" 1.02 "Ireland" 710 "Allitems" 1.024 "Ireland" 711 "Allitems" 1.023 "Ireland" 712 "Allitems" 1.025 "Ireland" 713 "Allitems" 1.023 "Ireland" 714 "Allitems" 1.028 "Ireland" 715 "Allitems" 1.026 "Ireland" 716 "Allitems" 1.023 "Ireland" 717 "Allitems" 1.022 "Ireland" 718 "Allitems" 1.024 "Ireland" 719 "Allitems" 1.017 "Ireland" 720 "Allitems" 1.023 "Ireland" 721 "Allitems" 1.027 "Ireland" 722 "Allitems" 1.023 "Ireland" 723 "Allitems" 1.018 "Ireland" 724 "Allitems" 1.021 "Ireland" 725 "Allitems" 1.019 "Ireland" 726 "Allitems" 1.018 "Ireland" 727 "Allitems" 1.014 "Ireland" 728 "Bread" 1.056 "Ireland" 648 "Bread" 1.058 "Ireland" 649 "Bread" 1.051 "Ireland" 650 "Bread" 1.045 "Ireland" 651 "Bread" 1.049 "Ireland" 652 "Bread" 1.047 "Ireland" 653 "Bread" 1.047 "Ireland" 654 "Bread" 1.045 "Ireland" 655 "Bread" 1.043 "Ireland" 656 "Bread" 1.044 "Ireland" 657 "Bread" 1.032 "Ireland" 658 "Bread" 1.017 "Ireland" 659 "Bread" 1.019 "Ireland" 660 "Bread" 1.022 "Ireland" 661 "Bread" 1.016 "Ireland" 662 "Bread" 1.015 "Ireland" 663 "Bread" 1.013 "Ireland" 664 "Bread" 1.006 "Ireland" 665 "Bread" 1.006 "Ireland" 666 end format %tm ym
Comment