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
Rolling Bayesian EstimationDear all,
I am trying to obtain rolling "Bayesian" coefficients using a panel dataset with 50-quart…
Graph mirrored on x axis.Dear Statalist,
I want to graph my two variables Eff...DOWN and Eff...UP across time (variable Flex…
CAAR and t-test in event studyDear Statali,
I am currently working on an event study for my thesis. The study comprises of 1834 e…
Back-transform inverse hyperbolic sine variable after survey regressionHi Stata listers,
I am running an inverse hyperbolic sine regression with the survey command and ha…
Select cases with single observation from multiple variablesHi,
I have some data in the following format:
Array
And what I need to do for my analysis is to se…
Subscribe to:
Post Comments (Atom)
0 Response to Create a dataset from the current dataset
Post a Comment