Hello everyone!
I require assistance in writing the loops.
My data consists of the following in respect of US states.
State name, year, month of the year, product description code, and monthly tax rate (dependent variable).
There are:
I can do the procedure from taking a shapefile and calculating the Spatial weighting Matrix by following Drukker et al. 2013
I want to
I require assistance in writing the loops.
My data consists of the following in respect of US states.
State name, year, month of the year, product description code, and monthly tax rate (dependent variable).
There are:
- 50 states
- 6 years,
- 12 months for each of the year
- 30 products
I can do the procedure from taking a shapefile and calculating the Spatial weighting Matrix by following Drukker et al. 2013
I want to
- Keep the data in following example format:
year | month | state | product code | rate |
2000 | 1 | Alabama | 101 | 20 |
2000 | 1 | Arizona | 101 | 12 |
2000 | 1 | Arkansas | 101 | 25 |
- Calculate the Spatial weighting Matrix and then spatial lag for the monthly tax rate.
- Write a loop (foreach) that will repeat the procedure for all products and months-years.
Comment