How can i keep only one class of my variable in a histogram in SAS?

Viewed 70

I have this histogram:

enter image description here

But I want to have only the upper portion (owned). What should I add to my code?

My code is this:

proc univariate data=data3; 
var HHincome; 
class Ownership;
HISTOGRAM ; 
run;
2 Answers

Add a WHERE statement to filter the results to just the one category.

proc univariate data=data3; 
where ownership = 'OWNED';
var HHincome; 
class Ownership;
HISTOGRAM ; 
run;
proc univariate data=data3 (where=(Ownership = 'OWNED')); 
var HHincome; 
class Ownership;
HISTOGRAM ; 
run;
Related