Hello
Can someone help me create a dataset from my current dataset?
I have the following dataset:
Hospital | Therapy | var3 | var4 | var5 | Estimate_Therapy1 | Estimate_Therapy2 | Estimate_Therapy3 | Estimate_Therapy4
1 | 1 | 3 | 3 | 7 | 0.1 | . | . | .
1 | 2 | 3 | 3 | 7 | . | 0.3 | . | .
1 | 4 | 3 | 3 | 7 | . | . | . | 0.2
2 | 1 | 3 | 3 | 7 | 0.6 | . | . | .
2 | 2 | 3 | 3 | 7 | . | -0.2 | . | .
3 | 1 | 3 | 3 | 7 | 0.1 | . | . | .
3 | 2 | 3 | 3 | 7 | . | 0.3 | . | .
3 | 3 | 3 | 3 | 7 | . | . | -0.2 | .
3 | 4 | 3 | 3 | 7 | . | . | . | 0.2
And I would like to create the following 2 versions and export to excel:
# with all therapies (missing data)
Hospital | Estimate_Therapy1 | Estimate_Therapy2 | Estimate_Therapy3 | Estimate_Therapy4
1 | 0.1 | 0.3 | . | 0.2
2 | 0.6 | -0.2 | . | .
3 | 0.1 | 0.3 | -0.2 | 0.2
# with only those therapies used in all hospitals (no missing data)
Hospital | Estimate_Therapy1 | Estimate_Therapy2
1 | 0.1 | 0.3
2 | 0.6 | -0.2
3 | 0.1 | 0.3
Many thanks in advance!
Related Posts with Create a dataset from the current dataset
Automate file names using current dateHi All! I'm trying to create a local string reflecting the current date in the format, "YYYY-MM-DD"…
ANOVA test for clusteringHi, I want to check whether there is a need to cluster my results. I am doing a panel regression re…
Storing Hausmann test values for each yearHi All, I have data that resembles the following: Code: * Example generated by -dataex-. To ins…
outreg2Good morning, I am looking to create a table for logistic regression results, with a title, odds rat…
using tabstat for mean annual procedure volumeGood morning, I have a dataset of companies (ik), case-number, year, procedure-type and quintiles. …
Subscribe to:
Post Comments (Atom)
0 Response to Create a dataset from the current dataset
Post a Comment