Help using Base SAS procedures

Error Variable in list does not match type prescribed for this list.

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

Error Variable in list does not match type prescribed for this list.

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:


Accepted Solutions
Solution
‎10-01-2014 02:21 PM
Super User
Posts: 17,784

Re: Error Variable in list does not match type prescribed for this list.

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


All Replies
Trusted Advisor
Posts: 1,204

Re: Error Variable in list does not match type prescribed for this list.

Hi,

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

Solution
‎10-01-2014 02:21 PM
Super User
Posts: 17,784

Re: Error Variable in list does not match type prescribed for this list.

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

Occasional Contributor
Posts: 12

Re: Error Variable in list does not match type prescribed for this list.

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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