data ranksum; input serum $ race;
datalines;
94 0
54 1
31 0
21 1
46 1
56 0
18 1
19 1
12 1
14 0
25 0
35 1
22 1
71 0
43 1
35 1
42 1
50 1
44 1
41 0
28 0
65 0
31 0
35 1
91 1
;
run;
proc print; run;
proc npar1way wilcoxon correct=no data=ranksum;
class race;
var serum;
exact wilcoxon;
run;
Note: I am very new at using SAS and I am assuming the naming I used for the data has screwed up how the program is interpreting it. I am attempting to do a Wilcoxon Rank-Sum test on the distribution of serum estradiol. Any help would be appreciated as I am just a commoner and a foreigner when it comes to programming and writing :smileyblush:
data ranksum; input serum $ race;
The $ above tells SAS to import it as a character variable. Remove that, and it will import it as numeric and your analysis will run. If anything race should be the character variable.
data ranksum; input serum race $;
Hi,
Serum is an analysis variable. You are using it as character variable instead of numeric.
data ranksum; input serum $ race;
The $ above tells SAS to import it as a character variable. Remove that, and it will import it as numeric and your analysis will run. If anything race should be the character variable.
data ranksum; input serum race $;
That would make more sense I guess I got a bit confused on what the $ was even denoting. Thank you for the quick help!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.