Hi all,
I need advice on how to change the dataset which is in the form of table with 6 rows * 3 columns to table with 4 rows * 4 columns.
The original dataset is as follows.
input str6 treat1 str6 treat2 double(value)
treat1 treat2 value
1. "SK" "tPA" 0.98
2. "SK" "atPA" 0.84
3. "SK" "Comb" 0.95
4. "tPA" "atPA" 0.85
5. "tPA" "Comb" 0.97
6. "atPA" "Comb" 1.13
7. end
I need transformation to dataset like this.
input str6 row str6 SK str6 tPA str6 atPA str6 Comb
row SK tPA atPA Comb
1. "SK" . 0.98 0.84 0.95
2. "tPA" 0.98 . 0.85 0.97
3. "atPA" 0.84 0.85 . 1.13
4. "Comb" 0.95 0.97 1.13 .
5. end
I am struggling to find the solution.
I very much appreciate advice/help.
With warm regards,
Sateesh
Related Posts with Reshape long to wide
xtabond2 Hansen testHello I'm using system GMM to estimate TFP growth (gtfp_100) at regional level . I've a problem with…
ring setting of legend option and scheme modifiedDear Stata users, I like placing the legend inside the plot, so I modify scheme s2color as follows:…
Subsetting data using labelsHi, I have 15 big data sets where I want to keep only a few variables and I want to do the same to …
Static (not dynamic) panel data using xtabond2.Dear All, This is a question more about econometric concept rather than Stata code. While (ssc insta…
Synth_runner: Interpret the statistical outcome and general questions [Stata]Hello together, I am started to work with stata and synth_runner package. I try to figure out differ…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape long to wide
Post a Comment