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
Traj command (dropout model)Hello everyone, I am using the traj command to examined gait speed trajectories and I have a questi…
Making a dummy for threshold Hi, I am going to make a dummy Ii ( Em (i)<= Em) that selects firms whose employment (Em(i)) is…
Selecting Date RangeI have a data where one of the variables is CloseDate whose Variable Type is int and Format is %tdnn…
Zero event meta analysis with ipdmetanHey everyone, I'm trying to run a two-stage meta-analysis to generate a forest plot with individual …
How are p-values calculated in an Oaxaca-Blinder DecompositionHi all, I am trying to interpret the results of an Oaxaca-Blinder Decomposition. I am using the pop…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape long to wide
Post a Comment