I'm having an issue with proc summary in SAS 9.4. My code is:
proc summary data=project.new nway completetypes; class product_group product_id region district sales_channel status; var count premium age_policyholder_analysis_date_G duration_G; output out=project.test1 sum(premium muzi zeny)=sum_premium muzi zeny mean(age_policyholder_analysis_date_G duration_G)=mean_age mean_duration; run;
I'm trying to create an "aggregation" but the problem is when using completetypes statement. I get combination of each variables - also combination of "region" and "district" variables which makes no sense because for example distrct "Bratislava" doesn't exist in region "Banskobystrický" (see attached screenshot).
But when I do not use completetypes statement I don't get missing sums (in district "Brezno" for example) which I need.
Is there a way to use some sort of regional hierarchy or something?
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.