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

Hi,

I'm new to SAS and am working on a research project.  I would like to run proc glm on a data set but would like to exclude some observations in the data set so that I can compare apples to apples.  So here's the problem...

 

I'm working on analyzing patient satisfaction scores but I want to eliminate observations which have a response rate of greater than 25 or less than 17 so my syntax is as follows:

 

proc glm;

class var1 var2 var3;

model dvar=var1 var2 var3;

run;

 

In this syntax, can I use the if-then or between function for a totally different variable (var4)?  Variable 4 being response rate.  I'd like to use all observations with response rates between 17 and 25 percent so that I can eliminate the few outliers that are extremely high or low.  17-25 percent is the average response rate.

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

How about:

 

proc glm data=myUnnamedData;
where var4 between 0.17 and 0.25;
class var1 var2 var3;
model dvar=var1 var2 var3;
run;
PG

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

How about:

 

proc glm data=myUnnamedData;
where var4 between 0.17 and 0.25;
class var1 var2 var3;
model dvar=var1 var2 var3;
run;
PG
newbie10
Calcite | Level 5

Thank you!  I'll try this.

newbie10
Calcite | Level 5

It worked!  Thanks a bunch!