Hello,
I am trying to run a Diif-in-Diff analysis and I ran the following code, but I keep receiving an error due to the format of my date variable:
```
didregress (log_price) (DiD), group(city) time(year_month)
```
where my Y variable is log price, and DiD refers to treatment (i.e. 1 for treatment and 0 otherwise), city is the level at which I am clustering my observations, and then time is at the monthly level.
Here is the dataex:
```
* Example generated by -dataex-. For more info, type help dataex
clear
input float(log_price DiD) str21 city_trans float year_month
6.35437 0 "Santa Barbara" -6360
6.352306 0 "Santa Barbara" -6359
6.317792 0 "Santa Barbara" -6358
6.32594 0 "Santa Monica" -6357
6.307189 0 "Santa Monica" -6356
6.404986 0 "Santa Monica" -6355
6.417549 0 "Santa Monica" -6354
```
What's confusing to me as a new Stata user is that when I check the data browser, the year and month under the date variable read correctly to the human eye, but in Stata, such values are read as negative integers.
I am trying to run a Diif-in-Diff analysis and I ran the following code, but I keep receiving an error due to the format of my date variable:
```
didregress (log_price) (DiD), group(city) time(year_month)
```
where my Y variable is log price, and DiD refers to treatment (i.e. 1 for treatment and 0 otherwise), city is the level at which I am clustering my observations, and then time is at the monthly level.
Here is the dataex:
```
* Example generated by -dataex-. For more info, type help dataex
clear
input float(log_price DiD) str21 city_trans float year_month
6.35437 0 "Santa Barbara" -6360
6.352306 0 "Santa Barbara" -6359
6.317792 0 "Santa Barbara" -6358
6.32594 0 "Santa Monica" -6357
6.307189 0 "Santa Monica" -6356
6.404986 0 "Santa Monica" -6355
6.417549 0 "Santa Monica" -6354
```
What's confusing to me as a new Stata user is that when I check the data browser, the year and month under the date variable read correctly to the human eye, but in Stata, such values are read as negative integers.
Comment