Hi all,
I'm an economics student in college, doing my best to learn STATA. I've browsed the forum and googled everything I could, it took me too long to realize I should just ask. I'm not extremely well versed in STATA, but I know my way around. I feel what I'm trying to do is pretty basic, so hopefully any help I receive will seem familiar to me.
In short I'm working towards doing an interrupted time series with a speed limit increase and crash data. My main objective right now is counting the number of crashes that occurred in each month so I can graph it. I have the date in different variables (as a date(crash_datetime "MDYhm") and as separate varables as month, year, etc.).
Since there are mutiple crashes on any given day, I need to count the observation on a given month/year, but I have not been able to figure it out. My knowledge (and apparently researching ability) of egen, count, and dates is inadequate.
Any help or nudge in the right direction is much appreciated,
Caleb
Related Posts with Counting observations over duplicate dates
How to estimate a Diff-in-Diff with this longitudinal data structure?Dear Statalist, I am interested in implement a diff-in-diff (DID) analysis for the following longit…
Creating a year variableHi All I'm creating a set of 5 date variables to calculate age of my study participants. The 5 vari…
Seeking collaborator for new command (splines, numeric integration)I am seeking a collaborator to develop a new Stata command that implements CDF interpolation. In ret…
automated do file backupWhen I save a do file I want to save it to the specified location and then also save a backup to one…
Choosing random group member observation in the presence of missing valuesDear all: I have a data set that looks roughly like this, i.e. individuals in groups. For most but …
Subscribe to:
Post Comments (Atom)
0 Response to Counting observations over duplicate dates
Post a Comment