Hi all,

I have the following problem to solve:

I have three variables, say A, B and C. A and B are the same kind of variable (GPA) and C tells you if they are treated (C=1) or untreated (C=0). I.e. A is the GPA of treated students, B is the GPA of untreated students.

For the Wilcoxon median test, I need to have one variable D that will be categorized according to C so that I can use:

My question is, how can I stack the two variables A and B into D while keeping for each observation the information given in C, i.e. the treatment?

Many thanks for your help.

Best,

Peter

I have the following problem to solve:

I have three variables, say A, B and C. A and B are the same kind of variable (GPA) and C tells you if they are treated (C=1) or untreated (C=0). I.e. A is the GPA of treated students, B is the GPA of untreated students.

For the Wilcoxon median test, I need to have one variable D that will be categorized according to C so that I can use:

Code:

ranksum D, by (C)

Many thanks for your help.

Best,

Peter

## Comment