BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
zahidhasandipu
Calcite | Level 5
/*In the study below, each participant was given four drugs and measured on three variables, 
how nauseous they felt, how much pain they were in, and how easily they fell asleep, all rated on a scale
of 1 to 15. I am only interested in the nausea rating, so I conducted the analysis below. */
 
What did I do incorrectly here?
 
DATA sickstudy;
INPUT #1 @1    PARTICIPANT     2.
         @5    DRUG            1.
         @10   NAUSEA          2.
         @15   SLEEP           2.
         @20   PAIN            2. ;
DATALINES;
01  1    08   10   10
02  1    10   13   12
03  1    07   10   12
04  1    06   09   10
01  3    07   08   09
02  3    11   15   14
03  3    08   10   09
04  3    05   08   08
01  4    12   11   12
02  4    09   12   12
03  4    10   14   13
04  4    07   12   11
01  2    08   08   09
02  2    13   14   14
03  2    11   11   12
04  2    07   08   07
;
Title "Nausea test" ;
PROC GLM  DATA=sickstudy;
   CLASS GROUP;
   MODEL NAUSEA  = DRUG ;
RUN;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

The big issue:  GROUP is not a variable in your data set.  It should not appear on a CLASS statement.

 

Likely, you should be using:

 

CLASS DRUG;

 

Minor issues:  #1 doesn't contribute to the working of the program.  Those two characters can be removed.  And PARTICIPANT should probably be a character variable.  To make that happen, use:

 

INPUT @1 PARTICIPANT $ 2.    .....................

View solution in original post

1 REPLY 1
Astounding
PROC Star

The big issue:  GROUP is not a variable in your data set.  It should not appear on a CLASS statement.

 

Likely, you should be using:

 

CLASS DRUG;

 

Minor issues:  #1 doesn't contribute to the working of the program.  Those two characters can be removed.  And PARTICIPANT should probably be a character variable.  To make that happen, use:

 

INPUT @1 PARTICIPANT $ 2.    .....................

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 397 views
  • 0 likes
  • 2 in conversation