Hello. I am working with the NYT COVID-19 data. The data presents two years worth of COVID-19 case and death data. Each month presents the geographic unit's case and death load for that month plus the case and death loads from the previous months ex. (two new cases per month):
```
Date Cases New_Cases
1-20 0 0
2-20 1 1
3-20 3 2
4-20 5 2
5-20 7 2
6-20 9 2
```
Is there a way to generate a variable (New_Cases) to subtract the number of cases from the previous month? For reference, I've included the NYT Github data below:
https://github.com/nytimes/covid-19-...s-counties.csv
Related Posts with Generate variable to subtract current value from previous value
Unique String – Numeric combinationHi Stata users, I have a data set with string and numeric variables and would want to check for each…
funnel plotsHi, While doing a meta analysis using stata 16.0, I was able to create standard funnel plots as well…
Unique id generationHello, I have a dataset where I have 4 municipalities. For each municipality, I have many villages. …
stata file cannot be opened with the information r(610) which says the file is not stata format.Hello, every statalist, I have an urgent issue now. I am using Stata/SE 14.0 and was editing my sta…
State Fixed Effects/State Dummy variable in PMG modelIf some states have higher values of Y variable than other states, then can we use state fixed effec…
Subscribe to:
Post Comments (Atom)
0 Response to Generate variable to subtract current value from previous value
Post a Comment