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
for loopshello, im trying to split a huge data set into about 400 files so that i can run an analysis on the…
Mean of Predictions (Point Estimates)Hey guys, I was hoping you would help me clarify a post-estimation issue I am having in stata. Assum…
Reshaping Long to Wide when the ID is Not UniqueHi Everyone, I have Stacked on how to manipulate my data to make the Reshape Command Works. In my c…
Mixed results of datas in normality testI have a data set with datas satisfying normality and for few of the variables, it doesn't. Please s…
InequalityHello What age should be considered in order to calculate the number of children and the number of a…
Subscribe to:
Post Comments (Atom)
0 Response to Separating cumulative data into actuals
Post a Comment