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

 Hi,

I would like to calculate a survey mean from a variable (VAR1) only with values above zero. Is this the right syntax?

 

PROC SURVEYMEANS DATA=sample1 MEAN SUM VARMETHOD=BRR;
DOMAIN DHHDDRI;
WHERE VAR1 ne 0;
VAR VAR1;
WEIGHT WTS_P;
REPWEIGHTS BSW1-BSW500;
RUN;

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

"only with values above zero" translates to

 

WHERE VAR1 > 0;

 

That should do it.

PG

View solution in original post

2 REPLIES 2
PGStats
Opal | Level 21

"only with values above zero" translates to

 

WHERE VAR1 > 0;

 

That should do it.

PG
ANKH1
Pyrite | Level 9
Thank you!

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 705 views
  • 0 likes
  • 2 in conversation