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
Trying to run a predicted probabilities plot with a twoway scatterplot with a splineI accidentally created two threads of the same thing …
Missing variables using reshape wide commandHi, This is the command I'm using- reshape wide day_piece, i(farm) j(day_sales) string And this is…
Coefficient interpretation from a GLM regression family(gamma) link(log)Hi all, I am trying to explain some coefficients from a GLM regression with family(gamma) link(log)…
GLS for non-linear equationln (Pit) = a*ln(Rit + b*Vit) + uit I want to estimate a, b for wide panel data (i = 1~16, t = 2007~…
Tried several variations...need help with graphing a predicted probabilities plot with twoway scatter plot and splinedHi Statalist, I cannot figure out how to do this... the attached graph is exactly what we want, but …
Subscribe to:
Post Comments (Atom)
0 Response to Create a dataset from the current dataset
Post a Comment