Programming the statistical procedures from SAS

how to use 'where' in proc univariate

Reply
Occasional Contributor
Posts: 15

how to use 'where' in proc univariate

how to use 'where' in proc univariate, can you give me an example?  thank you !

Super Contributor
Posts: 543

Re: how to use 'where' in proc univariate

Like this:

proc univariate data = sashelp.class;

     where sex = "F";

     var age;

     histogram age;

run;

OR:

proc univariate data = sashelp.class;

     where weight > 100;

     var age;

     histogram age;

run;

Smiley Happy

Respected Advisor
Posts: 4,747

Re: how to use 'where' in proc univariate

Or this :

proc univariate data = sashelp.class(where = (sex = "F"));

     var age;

     histogram age;

run;

PG

PG
Ask a Question
Discussion stats
  • 2 replies
  • 171 views
  • 2 likes
  • 3 in conversation