Please kindly me help me with SAS syntax correct for each line.
Like line2 with the right option should be "out" but not "outdata"
1.
proc sort data=ccm_base_cust_inf_m(keep becif_custid cert_id_18)
2.
outdata=ccm_base_cust_inf_m;
where cert_id_18 <>"";
by cert_id_18;
3.
proc sort data=prom_cust_inf(rename=(id=cert_id_18));
by id;
4.
data prom_cust_inf_1;
5.
merge prom_cust_inf(in=a)
ccm_base_acct_inf_m(in=b);
6.
by id;
if a;
length base_city=$20.;
base_city=input(base_city,$city.);
7.
%let city=%str(NY","SH","TK");
8.
proc summary data=prom_cust_inf_1 nway;
9.
by base_city;
10.
var response_flag;
out=stat_city_sum(drop=_type_) sum;
run;
change :
outdata=ccm_base_cust_inf_m;
to:
out=ccm_base_cust_inf_m;
1.
proc sort data=ccm_base_cust_inf_m(keep becif_custid cert_id_18)
2.
out=ccm_base_cust_inf_m;
where cert_id_18 ne "";
by cert_id_18;
3.
proc sort data=prom_cust_inf out=(rename=(id=cert_id_18));
by id;
4.
data prom_cust_inf_1;
5.
merge prom_cust_inf(in=a)
ccm_base_acct_inf_m(in=b);
6.
by id;
if a;
length base_city $20.;
base_city=input(base_city,$city.);
7.
%let city=%str(NY,SH,TK);
8.
proc summary data=prom_cust_inf_1 nway;
9.
by base_city;
10.
var response_flag;
out=stat_city_sum(drop=_type_) sum;
run
That is it, does it work now?
Happy data mining
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.