Hi all
First of all, apologies if I am not able to explain this very well. I am very new to Stata and still struggling with the lingo.
Essentially, I have a set of observations from different countries of the number of confirmed cases of a certain disease. The data is cumulative and each variable represents a single day in a series of days. An example below:
countryre~n | v5 | v6 | v7 | v8 | v9 | v10 | v11 | v12 | v13 | v14 | v15 | v16 | v17 | v18 | v19 | v20 | v21 |
| Australia | 0 | 0 | 0 | 0 | 4 | 5 | 5 | 6 | 9 | 9 | 12 | 12 | 12 | 13 | 13 | 14 | 15 |
|-----------------------+-----------------------------------------------------------------------------------------|
| v22 | v23 | v24 | v25 | v26 | v27 | v28 | v29 | v30 | v31 | v32 | v33 | v34 | v35 | v36 | v37 | v38 | v39 | v40 |
| 15 | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 19 | 22 | 22 | 22 | 22 | 22 |
I need to separate this cumulative data into each individual day, i.e essentially I want 40 different variables that are xn = vn - vn-1 if that makes sense.
Is there a function I can use for this or will I have to separately generate a variable?
Related Posts with Separating cumulative data into actuals
Renaming a set of variables with a single commandHi there, I have a two time period data (baseline in 2014 and midline in 2016). The variables in th…
Mann-Kendall TestHi... I am working on the different attributes of female from 2003 to 2017. I want to see the trend …
Difference-in-Difference in StataHi there, apologies in advance if this question is a bit novice. I am tasked with a school assignme…
A problem with interaction in mlogit and marginal effects at meansHey all, thanks beforehand. I'm using MEM and getting a weird result, so I think I'm doing somethin…
Average annual growth rate from panel with gaps in the time seriesHello everyone, I have a panel with occupation shares (already in percentages) across 9 occupation …
Subscribe to:
Post Comments (Atom)
0 Response to Separating cumulative data into actuals
Post a Comment