Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Confused why my R^2 is either 0 or 1

    Hi All,

    I am a bit confused why my r2 value seems to be either very close to 0 or very close to 1. When I include product fixed effects, r2 is around 1, but when I do not it is around 0. Is this just a function of my data, or is there something funny going on with my regression specification. Please let me know if you have any ideas--the regression and data are attached below.

    Many thanks

    Code:
    reg percent after2016_soft_drink ib24.id_test5  if country=="Ireland" & type==1 , robust //just product fixed effects


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str14 country str43 prod int year byte type float(percent after2016_soft_drink) long id_test5
    "Ireland" "Baby Food"                                   2014 1  11.23656 0  2
    "Ireland" "Baby Food"                                   2015 1 11.146546 0  2
    "Ireland" "Baby Food"                                   2016 1 11.085676 0  2
    "Ireland" "Baby Food"                                   2017 1 11.022975 0  2
    "Ireland" "Baby Food"                                   2018 1 10.941716 0  2
    "Ireland" "Baby Food"                                   2019 1  10.84163 0  2
    "Ireland" "Baby Food"                                   2020 1 10.768182 0  2
    "Ireland" "Baked Goods"                                 2014 1   3.59136 0  3
    "Ireland" "Baked Goods"                                 2015 1 3.5733924 0  3
    "Ireland" "Baked Goods"                                 2016 1  3.575801 0  3
    "Ireland" "Baked Goods"                                 2017 1  3.590291 0  3
    "Ireland" "Baked Goods"                                 2018 1 3.6065545 0  3
    "Ireland" "Baked Goods"                                 2019 1  3.558706 0  3
    "Ireland" "Baked Goods"                                 2020 1  3.655866 0  3
    "Ireland" "Bottled Water"                               2014 1 .24856895 0  4
    "Ireland" "Bottled Water"                               2015 1     .2453 0  4
    "Ireland" "Bottled Water"                               2016 1  .2415012 0  4
    "Ireland" "Bottled Water"                               2017 1 .23278593 0  4
    "Ireland" "Bottled Water"                               2018 1  .2289391 0  4
    "Ireland" "Bottled Water"                               2019 1  .2241746 0  4
    "Ireland" "Bottled Water"                               2020 1  .2141973 0  4
    "Ireland" "Breakfast Cereals"                           2014 1 11.639448 0  5
    "Ireland" "Breakfast Cereals"                           2015 1 11.151115 0  5
    "Ireland" "Breakfast Cereals"                           2016 1  10.61238 0  5
    "Ireland" "Breakfast Cereals"                           2017 1  10.16696 0  5
    "Ireland" "Breakfast Cereals"                           2018 1 10.061397 0  5
    "Ireland" "Breakfast Cereals"                           2019 1   9.95774 0  5
    "Ireland" "Breakfast Cereals"                           2020 1  9.548981 0  5
    "Ireland" "Carbonates"                                  2014 1  6.348202 0  6
    "Ireland" "Carbonates"                                  2015 1  6.350781 0  6
    "Ireland" "Carbonates"                                  2016 1   6.35649 0  6
    "Ireland" "Carbonates"                                  2017 1  6.370764 0  6
    "Ireland" "Carbonates"                                  2018 1  6.389736 0  6
    "Ireland" "Carbonates"                                  2019 1  6.414242 0  6
    "Ireland" "Carbonates"                                  2020 1  6.408684 0  6
    "Ireland" "Concentrates"                                2014 1 35.317375 0  8
    "Ireland" "Concentrates"                                2015 1  35.31619 0  8
    "Ireland" "Concentrates"                                2016 1 35.315624 0  8
    "Ireland" "Concentrates"                                2017 1 35.314735 0  8
    "Ireland" "Concentrates"                                2018 1  35.31444 0  8
    "Ireland" "Concentrates"                                2019 1 35.314423 0  8
    "Ireland" "Concentrates"                                2020 1 35.315037 0  8
    "Ireland" "Confectionery"                               2014 1  62.92487 0  9
    "Ireland" "Confectionery"                               2015 1  63.17175 0  9
    "Ireland" "Confectionery"                               2016 1  63.14231 0  9
    "Ireland" "Confectionery"                               2017 1  63.15345 0  9
    "Ireland" "Confectionery"                               2018 1  63.11845 0  9
    "Ireland" "Confectionery"                               2019 1  63.05539 0  9
    "Ireland" "Confectionery"                               2020 1  62.71669 0  9
    "Ireland" "Dairy"                                       2014 1  .9243396 0 10
    "Ireland" "Dairy"                                       2015 1   .930746 0 10
    "Ireland" "Dairy"                                       2016 1  .9201722 0 10
    "Ireland" "Dairy"                                       2017 1  .9173517 0 10
    "Ireland" "Dairy"                                       2018 1  .9221441 0 10
    "Ireland" "Dairy"                                       2019 1   .929574 0 10
    "Ireland" "Dairy"                                       2020 1   1.00755 0 10
    "Ireland" "Energy Drinks"                               2014 1 10.103338 0 12
    "Ireland" "Energy Drinks"                               2015 1 10.103643 0 12
    "Ireland" "Energy Drinks"                               2016 1 10.103355 0 12
    "Ireland" "Energy Drinks"                               2017 1 10.103985 0 12
    "Ireland" "Energy Drinks"                               2018 1 10.103443 0 12
    "Ireland" "Energy Drinks"                               2019 1 10.103394 0 12
    "Ireland" "Energy Drinks"                               2020 1 10.103936 0 12
    "Ireland" "Ice Cream and Frozen Desserts"               2014 1   19.1186 0 13
    "Ireland" "Ice Cream and Frozen Desserts"               2015 1 19.098225 0 13
    "Ireland" "Ice Cream and Frozen Desserts"               2016 1  19.09331 0 13
    "Ireland" "Ice Cream and Frozen Desserts"               2017 1   19.0873 0 13
    "Ireland" "Ice Cream and Frozen Desserts"               2018 1 19.050138 0 13
    "Ireland" "Ice Cream and Frozen Desserts"               2019 1 19.033953 0 13
    "Ireland" "Ice Cream and Frozen Desserts"               2020 1  19.09863 0 13
    "Ireland" "Juice"                                       2014 1 3.0413754 0 14
    "Ireland" "Juice"                                       2015 1 3.0580075 0 14
    "Ireland" "Juice"                                       2016 1 3.0562584 0 14
    "Ireland" "Juice"                                       2017 1  3.049268 0 14
    "Ireland" "Juice"                                       2018 1  3.035255 0 14
    "Ireland" "Juice"                                       2019 1  3.020876 0 14
    "Ireland" "Juice"                                       2020 1   3.06544 0 14
    "Ireland" "Packaged Food"                               2014 1  5.469778 0 15
    "Ireland" "Packaged Food"                               2015 1  5.532712 0 15
    "Ireland" "Packaged Food"                               2016 1  5.522424 0 15
    "Ireland" "Packaged Food"                               2017 1  5.515925 0 15
    "Ireland" "Packaged Food"                               2018 1  5.520149 0 15
    "Ireland" "Packaged Food"                               2019 1  5.507498 0 15
    "Ireland" "Packaged Food"                               2020 1  5.607995 0 15
    "Ireland" "Processed Fruit and Vegetables"              2014 1 1.7360425 0 16
    "Ireland" "Processed Fruit and Vegetables"              2015 1  1.698017 0 16
    "Ireland" "Processed Fruit and Vegetables"              2016 1 1.6658442 0 16
    "Ireland" "Processed Fruit and Vegetables"              2017 1  1.637492 0 16
    "Ireland" "Processed Fruit and Vegetables"              2018 1 1.6144403 0 16
    "Ireland" "Processed Fruit and Vegetables"              2019 1  1.600096 0 16
    "Ireland" "Processed Fruit and Vegetables"              2020 1  1.640763 0 16
    "Ireland" "Processed Meat and Seafood"                  2014 1 .04108283 0 17
    "Ireland" "Processed Meat and Seafood"                  2015 1 .04265017 0 17
    "Ireland" "Processed Meat and Seafood"                  2016 1 .04456066 0 17
    "Ireland" "Processed Meat and Seafood"                  2017 1  .0469672 0 17
    "Ireland" "Processed Meat and Seafood"                  2018 1 .04887794 0 17
    "Ireland" "Processed Meat and Seafood"                  2019 1 .05062876 0 17
    "Ireland" "Processed Meat and Seafood"                  2020 1 .05250965 0 17
    "Ireland" "RTD Coffee"                                  2014 1  5.995004 0 18
    "Ireland" "RTD Coffee"                                  2015 1  6.011316 0 18
    "Ireland" "RTD Coffee"                                  2016 1  5.985267 0 18
    "Ireland" "RTD Coffee"                                  2017 1  5.997819 0 18
    "Ireland" "RTD Coffee"                                  2018 1  6.007416 0 18
    "Ireland" "RTD Coffee"                                  2019 1  5.999571 0 18
    "Ireland" "RTD Coffee"                                  2020 1  5.999146 0 18
    "Ireland" "RTD Tea"                                     2014 1  3.071783 0 19
    "Ireland" "RTD Tea"                                     2015 1 3.0684104 0 19
    "Ireland" "RTD Tea"                                     2016 1  3.068763 0 19
    "Ireland" "RTD Tea"                                     2017 1 3.0681415 0 19
    "Ireland" "RTD Tea"                                     2018 1  3.510013 0 19
    "Ireland" "RTD Tea"                                     2019 1   3.52518 0 19
    "Ireland" "RTD Tea"                                     2020 1  3.564835 0 19
    "Ireland" "Ready Meals"                                 2014 1 2.1252944 0 20
    "Ireland" "Ready Meals"                                 2015 1 2.1152093 0 20
    "Ireland" "Ready Meals"                                 2016 1  2.105294 0 20
    "Ireland" "Ready Meals"                                 2017 1 2.0956857 0 20
    "Ireland" "Ready Meals"                                 2018 1  2.087825 0 20
    "Ireland" "Ready Meals"                                 2019 1  2.081734 0 20
    "Ireland" "Ready Meals"                                 2020 1 2.0981636 0 20
    "Ireland" "Rice, Pasta and Noodles"                     2014 1   .196448 0 21
    "Ireland" "Rice, Pasta and Noodles"                     2015 1 .19626646 0 21
    "Ireland" "Rice, Pasta and Noodles"                     2016 1  .1968149 0 21
    "Ireland" "Rice, Pasta and Noodles"                     2017 1 .19581278 0 21
    "Ireland" "Rice, Pasta and Noodles"                     2018 1  .1947974 0 21
    "Ireland" "Rice, Pasta and Noodles"                     2019 1  .1934637 0 21
    "Ireland" "Rice, Pasta and Noodles"                     2020 1  .2083276 0 21
    "Ireland" "Sauces, Dressings and Condiments"            2014 1  8.825227 0 22
    "Ireland" "Sauces, Dressings and Condiments"            2015 1  8.820618 0 22
    "Ireland" "Sauces, Dressings and Condiments"            2016 1  8.824866 0 22
    "Ireland" "Sauces, Dressings and Condiments"            2017 1  8.839599 0 22
    "Ireland" "Sauces, Dressings and Condiments"            2018 1  8.857142 0 22
    "Ireland" "Sauces, Dressings and Condiments"            2019 1  8.886955 0 22
    "Ireland" "Sauces, Dressings and Condiments"            2020 1  8.830546 0 22
    "Ireland" "Savoury Snacks"                              2014 1 2.0625205 0 23
    "Ireland" "Savoury Snacks"                              2015 1 2.0684388 0 23
    "Ireland" "Savoury Snacks"                              2016 1 2.0787497 0 23
    "Ireland" "Savoury Snacks"                              2017 1 2.0814965 0 23
    "Ireland" "Savoury Snacks"                              2018 1 2.0832295 0 23
    "Ireland" "Savoury Snacks"                              2019 1 2.0836039 0 23
    "Ireland" "Savoury Snacks"                              2020 1 2.0550919 0 23
    "Ireland" "Soft Drinks"                                 2014 1  6.862564 0 24
    "Ireland" "Soft Drinks"                                 2015 1  6.837246 0 24
    "Ireland" "Soft Drinks"                                 2016 1  6.806424 1 24
    "Ireland" "Soft Drinks"                                 2017 1  6.753903 1 24
    "Ireland" "Soft Drinks"                                 2018 1  6.720791 1 24
    "Ireland" "Soft Drinks"                                 2019 1  6.666401 1 24
    "Ireland" "Soft Drinks"                                 2020 1  6.561389 1 24
    "Ireland" "Soup"                                        2014 1  1.971153 0 25
    "Ireland" "Soup"                                        2015 1 1.9343156 0 25
    "Ireland" "Soup"                                        2016 1  1.900129 0 25
    "Ireland" "Soup"                                        2017 1 1.8761808 0 25
    "Ireland" "Soup"                                        2018 1 1.8468708 0 25
    "Ireland" "Soup"                                        2019 1   1.81076 0 25
    "Ireland" "Soup"                                        2020 1  1.785509 0 25
    "Ireland" "Sports Drinks"                               2014 1   6.36638 0 26
    "Ireland" "Sports Drinks"                               2015 1  6.366788 0 26
    "Ireland" "Sports Drinks"                               2016 1  6.366546 0 26
    "Ireland" "Sports Drinks"                               2017 1  6.366631 0 26
    "Ireland" "Sports Drinks"                               2018 1  6.366039 0 26
    "Ireland" "Sports Drinks"                               2019 1  6.366745 0 26
    "Ireland" "Sports Drinks"                               2020 1  6.366138 0 26
    "Ireland" "Sweet Biscuits, Snack Bars and Fruit Snacks" 2014 1 25.236227 0 27
    "Ireland" "Sweet Biscuits, Snack Bars and Fruit Snacks" 2015 1 25.259834 0 27
    "Ireland" "Sweet Biscuits, Snack Bars and Fruit Snacks" 2016 1  25.36835 0 27
    "Ireland" "Sweet Biscuits, Snack Bars and Fruit Snacks" 2017 1 25.453773 0 27
    "Ireland" "Sweet Biscuits, Snack Bars and Fruit Snacks" 2018 1 25.482094 0 27
    "Ireland" "Sweet Biscuits, Snack Bars and Fruit Snacks" 2019 1 25.503607 0 27
    "Ireland" "Sweet Biscuits, Snack Bars and Fruit Snacks" 2020 1 25.447124 0 27
    "UK"      "Baby Food"                                   2014 1  9.606463 0  2
    "UK"      "Baby Food"                                   2015 1  9.811398 0  2
    "UK"      "Baby Food"                                   2016 1  9.562346 0  2
    "UK"      "Baby Food"                                   2017 1  9.588136 0  2
    "UK"      "Baby Food"                                   2018 1  9.640036 0  2
    "UK"      "Baby Food"                                   2019 1  9.680828 0  2
    "UK"      "Baby Food"                                   2020 1   9.54126 0  2
    "UK"      "Baked Goods"                                 2014 1  6.793414 0  3
    "UK"      "Baked Goods"                                 2015 1  6.942422 0  3
    "UK"      "Baked Goods"                                 2016 1   7.13343 0  3
    "UK"      "Baked Goods"                                 2017 1  7.161265 0  3
    "UK"      "Baked Goods"                                 2018 1  7.224566 0  3
    "UK"      "Baked Goods"                                 2019 1  7.343345 0  3
    "UK"      "Baked Goods"                                 2020 1  7.259027 0  3
    "UK"      "Bottled Water"                               2014 1  .2458168 0  4
    "UK"      "Bottled Water"                               2015 1  .2673995 0  4
    "UK"      "Bottled Water"                               2016 1 .27807018 0  4
    "UK"      "Bottled Water"                               2017 1 .29721242 0  4
    "UK"      "Bottled Water"                               2018 1  .3198521 0  4
    "UK"      "Bottled Water"                               2019 1  .3483416 0  4
    "UK"      "Bottled Water"                               2020 1   .381956 0  4
    "UK"      "Breakfast Cereals"                           2014 1 11.428164 0  5
    "UK"      "Breakfast Cereals"                           2015 1 11.357417 0  5
    "UK"      "Breakfast Cereals"                           2016 1 11.374665 0  5
    "UK"      "Breakfast Cereals"                           2017 1 11.365828 0  5
    "UK"      "Breakfast Cereals"                           2018 1 11.323498 0  5
    "UK"      "Breakfast Cereals"                           2019 1 11.265875 0  5
    "UK"      "Breakfast Cereals"                           2020 1   11.1403 0  5
    "UK"      "Carbonates"                                  2014 1  4.837553 0  6
    "UK"      "Carbonates"                                  2015 1 4.7667556 0  6
    "UK"      "Carbonates"                                  2016 1  4.687071 0  6
    "UK"      "Carbonates"                                  2017 1  4.314491 0  6
    "UK"      "Carbonates"                                  2018 1 3.6543336 0  6
    "UK"      "Carbonates"                                  2019 1  3.567479 0  6
    "UK"      "Carbonates"                                  2020 1  3.343688 0  6
    "UK"      "Concentrates"                                2014 1 35.841877 0  8
    "UK"      "Concentrates"                                2015 1 35.839344 0  8
    "UK"      "Concentrates"                                2016 1 35.837082 0  8
    "UK"      "Concentrates"                                2017 1  35.83524 0  8
    "UK"      "Concentrates"                                2018 1  25.87878 0  8
    "UK"      "Concentrates"                                2019 1  25.87624 0  8
    "UK"      "Concentrates"                                2020 1  25.86675 0  8
    "UK"      "Confectionery"                               2014 1  59.81577 0  9
    "UK"      "Confectionery"                               2015 1  59.87397 0  9
    "UK"      "Confectionery"                               2016 1  59.79901 0  9
    "UK"      "Confectionery"                               2017 1  59.72615 0  9
    "UK"      "Confectionery"                               2018 1  59.64997 0  9
    "UK"      "Confectionery"                               2019 1  59.61634 0  9
    "UK"      "Confectionery"                               2020 1  59.52076 0  9
    "UK"      "Dairy"                                       2014 1  1.071459 0 10
    "UK"      "Dairy"                                       2015 1  1.063766 0 10
    "UK"      "Dairy"                                       2016 1 1.0456046 0 10
    "UK"      "Dairy"                                       2017 1 1.0421816 0 10
    "UK"      "Dairy"                                       2018 1 1.0363746 0 10
    "UK"      "Dairy"                                       2019 1 1.0343552 0 10
    "UK"      "Dairy"                                       2020 1 1.1203874 0 10
    "UK"      "Energy Drinks"                               2014 1  10.42524 0 12
    "UK"      "Energy Drinks"                               2015 1 10.801308 0 12
    "UK"      "Energy Drinks"                               2016 1 11.536214 0 12
    "UK"      "Energy Drinks"                               2017 1 10.523447 0 12
    "UK"      "Energy Drinks"                               2018 1 10.512192 0 12
    "UK"      "Energy Drinks"                               2019 1  9.949534 0 12
    "UK"      "Energy Drinks"                               2020 1   9.88203 0 12
    "UK"      "Ice Cream and Frozen Desserts"               2014 1  20.06675 0 13
    "UK"      "Ice Cream and Frozen Desserts"               2015 1 20.020103 0 13
    "UK"      "Ice Cream and Frozen Desserts"               2016 1  19.99304 0 13
    "UK"      "Ice Cream and Frozen Desserts"               2017 1 19.994284 0 13
    "UK"      "Ice Cream and Frozen Desserts"               2018 1  19.94577 0 13
    "UK"      "Ice Cream and Frozen Desserts"               2019 1 19.932613 0 13
    "UK"      "Ice Cream and Frozen Desserts"               2020 1  20.10033 0 13
    "UK"      "Juice"                                       2014 1   2.70828 0 14
    "UK"      "Juice"                                       2015 1  2.754218 0 14
    "UK"      "Juice"                                       2016 1  2.709872 0 14
    "UK"      "Juice"                                       2017 1 1.9217005 0 14
    "UK"      "Juice"                                       2018 1 1.6439304 0 14
    "UK"      "Juice"                                       2019 1 1.5807316 0 14
    "UK"      "Juice"                                       2020 1 1.4723092 0 14
    "UK"      "Packaged Food"                               2014 1  5.832136 0 15
    "UK"      "Packaged Food"                               2015 1  5.838514 0 15
    "UK"      "Packaged Food"                               2016 1  5.833578 0 15
    "UK"      "Packaged Food"                               2017 1  5.815641 0 15
    "UK"      "Packaged Food"                               2018 1  5.822683 0 15
    "UK"      "Packaged Food"                               2019 1  5.837513 0 15
    "UK"      "Packaged Food"                               2020 1  6.133363 0 15
    "UK"      "Processed Fruit and Vegetables"              2014 1 1.7016714 0 16
    "UK"      "Processed Fruit and Vegetables"              2015 1 1.6713642 0 16
    "UK"      "Processed Fruit and Vegetables"              2016 1  1.620583 0 16
    "UK"      "Processed Fruit and Vegetables"              2017 1 1.5909424 0 16
    "UK"      "Processed Fruit and Vegetables"              2018 1 1.5736285 0 16
    "UK"      "Processed Fruit and Vegetables"              2019 1 1.5496613 0 16
    "UK"      "Processed Fruit and Vegetables"              2020 1  1.699689 0 16
    "UK"      "Processed Meat and Seafood"                  2014 1  .3524341 0 17
    "UK"      "Processed Meat and Seafood"                  2015 1  .3510544 0 17
    "UK"      "Processed Meat and Seafood"                  2016 1  .3328692 0 17
    "UK"      "Processed Meat and Seafood"                  2017 1  .3322064 0 17
    "UK"      "Processed Meat and Seafood"                  2018 1  .3311414 0 17
    "UK"      "Processed Meat and Seafood"                  2019 1 .33039325 0 17
    "UK"      "Processed Meat and Seafood"                  2020 1  .3283532 0 17
    "UK"      "RTD Coffee"                                  2014 1  5.999623 0 18
    "UK"      "RTD Coffee"                                  2015 1  5.999889 0 18
    "UK"      "RTD Coffee"                                  2016 1  5.999874 0 18
    "UK"      "RTD Coffee"                                  2017 1  6.000189 0 18
    "UK"      "RTD Coffee"                                  2018 1  6.000096 0 18
    "UK"      "RTD Coffee"                                  2019 1  6.000138 0 18
    "UK"      "RTD Coffee"                                  2020 1  5.999907 0 18
    "UK"      "RTD Tea"                                     2014 1   3.07016 0 19
    "UK"      "RTD Tea"                                     2015 1  3.069702 0 19
    "UK"      "RTD Tea"                                     2016 1  3.070356 0 19
    "UK"      "RTD Tea"                                     2017 1 3.1847036 0 19
    "UK"      "RTD Tea"                                     2018 1  3.189453 0 19
    "UK"      "RTD Tea"                                     2019 1  3.308176 0 19
    "UK"      "RTD Tea"                                     2020 1  3.364031 0 19
    "UK"      "Ready Meals"                                 2014 1 1.6708004 0 20
    "UK"      "Ready Meals"                                 2015 1 1.6723886 0 20
    "UK"      "Ready Meals"                                 2016 1  1.656419 0 20
    "UK"      "Ready Meals"                                 2017 1  1.650124 0 20
    "UK"      "Ready Meals"                                 2018 1 1.6563387 0 20
    "UK"      "Ready Meals"                                 2019 1 1.6627778 0 20
    "UK"      "Ready Meals"                                 2020 1 1.6613806 0 20
    "UK"      "Rice, Pasta and Noodles"                     2014 1 .14997393 0 21
    "UK"      "Rice, Pasta and Noodles"                     2015 1 .15489295 0 21
    "UK"      "Rice, Pasta and Noodles"                     2016 1 .15195553 0 21
    "UK"      "Rice, Pasta and Noodles"                     2017 1 .14779134 0 21
    "UK"      "Rice, Pasta and Noodles"                     2018 1 .14520064 0 21
    "UK"      "Rice, Pasta and Noodles"                     2019 1 .14316571 0 21
    "UK"      "Rice, Pasta and Noodles"                     2020 1  .1624305 0 21
    "UK"      "Sauces, Dressings and Condiments"            2014 1     8.915 0 22
    "UK"      "Sauces, Dressings and Condiments"            2015 1  8.927175 0 22
    "UK"      "Sauces, Dressings and Condiments"            2016 1  8.928153 0 22
    "UK"      "Sauces, Dressings and Condiments"            2017 1  8.913875 0 22
    "UK"      "Sauces, Dressings and Condiments"            2018 1  8.916604 0 22
    "UK"      "Sauces, Dressings and Condiments"            2019 1  8.927868 0 22
    "UK"      "Sauces, Dressings and Condiments"            2020 1 8.9235735 0 22
    "UK"      "Savoury Snacks"                              2014 1 1.9789884 0 23
    "UK"      "Savoury Snacks"                              2015 1  2.012577 0 23
    "UK"      "Savoury Snacks"                              2016 1   2.05255 0 23
    "UK"      "Savoury Snacks"                              2017 1 2.0825663 0 23
    "UK"      "Savoury Snacks"                              2018 1 2.0980093 0 23
    "UK"      "Savoury Snacks"                              2019 1 2.1167738 0 23
    "UK"      "Savoury Snacks"                              2020 1 2.1594224 0 23
    "UK"      "Soft Drinks"                                 2014 1  5.194746 0 24
    "UK"      "Soft Drinks"                                 2015 1  5.086492 0 24
    "UK"      "Soft Drinks"                                 2016 1   5.00631 1 24
    "UK"      "Soft Drinks"                                 2017 1 4.6126695 1 24
    "UK"      "Soft Drinks"                                 2018 1  3.784254 1 24
    "UK"      "Soft Drinks"                                 2019 1  3.790768 1 24
    "UK"      "Soft Drinks"                                 2020 1  3.814522 1 24
    "UK"      "Soup"                                        2014 1 1.8522322 0 25
    "UK"      "Soup"                                        2015 1 1.8229227 0 25
    "UK"      "Soup"                                        2016 1  1.793307 0 25
    "UK"      "Soup"                                        2017 1 1.7931393 0 25
    "UK"      "Soup"                                        2018 1  1.788847 0 25
    "UK"      "Soup"                                        2019 1  1.782042 0 25
    "UK"      "Soup"                                        2020 1  1.789926 0 25
    "UK"      "Sports Drinks"                               2014 1  6.366466 0 26
    "UK"      "Sports Drinks"                               2015 1  6.366437 0 26
    "UK"      "Sports Drinks"                               2016 1  6.366476 0 26
    "UK"      "Sports Drinks"                               2017 1   6.36643 0 26
    "UK"      "Sports Drinks"                               2018 1  6.366412 0 26
    "UK"      "Sports Drinks"                               2019 1  6.366494 0 26
    "UK"      "Sports Drinks"                               2020 1  6.366454 0 26
    "UK"      "Sweet Biscuits, Snack Bars and Fruit Snacks" 2014 1  27.27092 0 27
    "UK"      "Sweet Biscuits, Snack Bars and Fruit Snacks" 2015 1 26.955713 0 27
    "UK"      "Sweet Biscuits, Snack Bars and Fruit Snacks" 2016 1  26.86362 0 27
    "UK"      "Sweet Biscuits, Snack Bars and Fruit Snacks" 2017 1  26.81517 0 27
    "UK"      "Sweet Biscuits, Snack Bars and Fruit Snacks" 2018 1  26.83115 0 27
    "UK"      "Sweet Biscuits, Snack Bars and Fruit Snacks" 2019 1 26.784353 0 27
    "UK"      "Sweet Biscuits, Snack Bars and Fruit Snacks" 2020 1  26.72545 0 27
    "UK"      "Tea"                                         2014 1 1.1418957 0 28
    "UK"      "Tea"                                         2015 1 1.1463078 0 28
    "UK"      "Tea"                                         2016 1 1.1434711 0 28
    "UK"      "Tea"                                         2017 1 1.1718475 0 28
    "UK"      "Tea"                                         2018 1  1.243149 0 28
    "UK"      "Tea"                                         2019 1 1.1875161 0 28
    "UK"      "Tea"                                         2020 1 1.0924131 0 28
    end
    label values type Type
    label def Type 1 "Sugars", modify
    label values id_test5 id_test5
    label def id_test5 2 "Baby Food", modify
    label def id_test5 3 "Baked Goods", modify
    label def id_test5 4 "Bottled Water", modify
    label def id_test5 5 "Breakfast Cereals", modify
    label def id_test5 6 "Carbonates", modify
    label def id_test5 8 "Concentrates", modify
    label def id_test5 9 "Confectionery", modify
    label def id_test5 10 "Dairy", modify
    label def id_test5 12 "Energy Drinks", modify
    label def id_test5 13 "Ice Cream and Frozen Desserts", modify
    label def id_test5 14 "Juice", modify
    label def id_test5 15 "Packaged Food", modify
    label def id_test5 16 "Processed Fruit and Vegetables", modify
    label def id_test5 17 "Processed Meat and Seafood", modify
    label def id_test5 18 "RTD Coffee", modify
    label def id_test5 19 "RTD Tea", modify
    label def id_test5 20 "Ready Meals", modify
    label def id_test5 21 "Rice, Pasta and Noodles", modify
    label def id_test5 22 "Sauces, Dressings and Condiments", modify
    label def id_test5 23 "Savoury Snacks", modify
    label def id_test5 24 "Soft Drinks", modify
    label def id_test5 25 "Soup", modify
    label def id_test5 26 "Sports Drinks", modify
    label def id_test5 27 "Sweet Biscuits, Snack Bars and Fruit Snacks", modify
    label def id_test5 28 "Tea", modify

  • #2
    Most of the variation is between products, not within products, to use analysis of variance language.

    Comment


    • #3
      Yes, that is true but I wanted to try and measure the impact of a tax on just soft drinks while using the other products as controls. I am more just trying to understand why the r2 value goes from being so small to so large. Is it just because of the larger variation between products compared to the variation within each product?

      Comment


      • #4
        That's my interpretation. Sometimes R-square measures how well you've done what you want to do, but often not.

        You can get high R-square when you deserve no credit and low R-square when you deserve no blame.

        You'd get good R-square relating temperatures to time of year, but that doesn't mean that your model even begins to explain climate change.

        Comment

        Working...
        X