Hey!
So I am a newbie at stata programming and have a problem trying to find weighted averages by category.
I have a panel data set (region and month) that is separated by US regions (mid-west, east-south central, middle atlantic, etc). One of the variables are heating degree days (HDD) that are separated by region per month. I want to generate a variable for region i (Wit) that is the weighted HDD population average of the other regions (-i). Then, I want to sum those averages across lags from 2 to 12 (t-2 to t-12).
thanks for helping out!
So I am a newbie at stata programming and have a problem trying to find weighted averages by category.
I have a panel data set (region and month) that is separated by US regions (mid-west, east-south central, middle atlantic, etc). One of the variables are heating degree days (HDD) that are separated by region per month. I want to generate a variable for region i (Wit) that is the weighted HDD population average of the other regions (-i). Then, I want to sum those averages across lags from 2 to 12 (t-2 to t-12).
thanks for helping out!