분류 | 게시판 |
베스트 |
|
유머 |
|
이야기 |
|
이슈 |
|
생활 |
|
취미 |
|
학술 |
|
방송연예 |
|
방송프로그램 |
|
디지털 |
|
스포츠 |
|
야구팀 |
|
게임1 |
|
게임2 |
|
기타 |
|
운영 |
|
임시게시판 |
|
data aa;
libname Hn11_24R 'D:\SAS\HN11_24RC';
set Hn11_24R.Hn11_24RC(keep=id age n_fcode3 nf_intk3);
if age<=2 then age_g=1;
else if age<=6 then age_g=2;
else if age<=12 then age_g=3;
else if age<=19 then age_g=4;
else if age<=29 then age_g=5;
else if age<=49 then age_g=6;
else if age<=64 then age_g=7;
else age_g=8;
run;
proc sql;
create table aa01 as
select distinct id, age, age_g
from aa
order by id
;
create table aa02 as
select distinct id, count(id) as cnt, age, age_g, sum(nf_intk3) as nf_intk3_s
from aa
where N_fcode3 in ('11031')
group by id
order by id
;
create table aa03 as
select a.id, a.age, a.age_g, nf_intk3_s
from aa01 a full join aa02 b on a.id=b.id
;
quit;
data aa03, set aa03, if nf_intk3_s=. then nf_intk3_s=0 run;
options ls=150;
proc means data=aa02 n mean std max min p95 p99; class age_g; var nf_intk3_s; run;
proc means data=aa03 n mean std max min p95 p99; class age_g; var nf_intk3_s; run;
options;
죄송합니다. 댓글 작성은 회원만 가능합니다.