Hi-
I have two non-normally distributed variables, RA_Opening and RA_Vasoactive, which are not independent. I am trying to run a non-parametric test on them--wilcoxin signed rank test.
What is the easiest way to do this? Should I just create a new variable, RA_Change, for difference between the two and run proc univariate or is there another way?
Data per below:
RA_Opening | RA_Vasoactive |
21 | 8 |
15 | 14 |
15 | 18 |
8 | 6 |
28 | 9 |
18 | 12 |
30 | 15 |
10 | 4 |
6 | 4 |
15 | 5 |
27 | 11 |
15 | |
13 | 8 |
14 | 4 |
10 | 2 |
8 | 8 |
11 | 14 |
18 | 16 |
19 | 8 |
12 | 9 |
16 | 8 |
12 | 12 |
13 | 14 |
By not independent do you mean that your RA_Vasoactive values are expected to change in a certain manner with changes in the RA_Opening value (or vice versa)?
That would look more like a regression problem.
Otherwise the Univariate approach seem like what you want with an added variable for the difference if the values are paired
I assume that these are paired observations before and after some time period or event. You can compute the difference between the values and test whether the mean (or median) difference is significantly different from 0:
data Have;
input RA_Opening RA_Vasoactive;
diff = RA_Opening - RA_Vasoactive;
datalines;
21 8
15 14
15 18
8 6
28 9
18 12
30 15
10 4
6 4
15 5
27 11
15 .
13 8
14 4
10 2
8 8
11 14
18 16
19 8
12 9
16 8
12 12
13 14
;
proc univariate data=Have mu0=0 loccount;
var diff;
histogram diff / href=0;
ods select TestsForLocation LocationCounts Histogram;
run;
In this case, 17/20 differences are greater than 0, so the signed rank test rejects the null hypothesis that the difference is 0.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.