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
Identifying variable that contains rowmax valueI am trying to identify the variable that equals the rowmax variable, but am running into issues. I…
Estimation of ATT for a naive regression estimatorHello, I want to estimate an average treatment effect on the treated (ATT) for a naive regression wi…
How to Getting Rid of The Factorial Variables after Deleting Multicolinear Variables Using "_rmcoll"I have a set of variables X1, X2, X3, X4, X5. Among them, X5 is colinear with X3. So I use the comma…
sem convergence not achievedHello everyone, I am trying to estimate the following structural model sem (ln_gdp <- ln_k ln_h…
Importing and manipulating super large datasetsHi everyone, I was handling with a very large confidential data. Specifically, I run the Stata prog…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape long to wide
Post a Comment