BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RCPenguin
Calcite | Level 5

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:

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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 $;

View solution in original post

3 REPLIES 3
stat_sas
Ammonite | Level 13

Hi,

Serum is an analysis variable. You are using it as character variable instead of numeric.

Reeza
Super User

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 $;

RCPenguin
Calcite | Level 5

That would make more sense I guess I got a bit confused on what the $ was even denoting.  Thank you for the quick help!

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 8188 views
  • 3 likes
  • 3 in conversation