data neg_prices;
set homework_one;
if price<0 then price_type = 'neg'; * create new label: negative when price is less than zero and otherwise;
else price_type = 'pos';
run;
proc means data=neg_prices n;a
class price_type; * get number of observations for negative prices;
var price;
run;
I have a proc means output as shown below: I want to extract N from the table and evaluate N for neg/(N for neg + N for pos), pretty much get the proportion of negative data from total data. How to go about this problem? SAS Output The MEANS Procedure Analysis Variable: Price price_type N Obs N neg 594 pos 69478 594 69478
... View more