Research
- Crime Categories
- Murder Circumstances
- Charges
- Murder Numbers by SHR
- Definitions of Murder
- Crime Literature
- Other Literature
- Seminars
- Journal Ranking
- Laws
- Changes in Law and Reporting in Michigan
- Citation Guides
- Datasets
Writing
Methods
- BLP
- Econometrics Models
- Econometrics Tests
- Econometrics Resources
- Event Study Plots
- Metrics Literature
- Machine Learning
Python-related
- Python Basic Commands
- Pandas Imports and Exports
- Pandas Basic Commands
- Plotting in Python
- Python web scraping sample page
- Two Sample t Test in Python
- Modeling in Python
R-related
- R Basics
- R Statistics Basics
- RStudio Basics
- R Graphics
- R Programming
- Accessing MySQL Databases from R
Latex-related
Stata-related
SQL
Github
Linux-related
Conda-related
AWS-related
Webscraping
Interview Prep
Other
Dates in Stata
Change annual data into monthly:
use population.dta
keep if statename=="Michigan"
expand 12
by year, sort: gen month = _n
gen monthly_date = mofd(mdy(month, 1, year))
format monthly_date %tm
* Each year's population is recorded for month 7
replace population = . if inlist(month, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12)
* Interpolate/extrapolate
ipolate population monthly_date, epolate generate(population_ep)