|
楼主

楼主 |
发表于 2011-10-21 03:21:26
|
只看该作者
excel 表格生成问题?
麻烦看一下我的code, 我想要生成这样的表格。
C1 C2 C3
8275 301 6
下面是我的code.
proc sql;
create table N_old_cdw as
select 2006 as year, count(unique(baseid))as C1
from Cdw06_old;
quit; *8275;
* Elderly(65+)community-dwellers with 1+ MH;
** N with 1+ MH;
data cdw06_old_mh ;
set Cdw06_old ( where=( MH=1)) ;
by baseid ;
if (first.baseid ne 1 or last.baseid ne 1) then output ;
run ; *1931 duplicate patients with 1+ MH claim;
** 2, Unique Elderly community-dwellers with 1+ MH claim;
proc sql;
create table N_g1mh as
select 2006 as year,count(unique(baseid)) as C2
from cdw06_old_mh;
quit; *301 unique elderly community-dwellers patients with 1+ MH claim;
** 3, Unique Elderly community-dwellers with 1+ MH claim and >20% copay;
proc sql;
create table N_g1mh_hicopay as
select count(unique(baseid)) as C3
from cdw06_old_mh
where coinrate>0.2;
quit; * 6 patiens with 1+ MH claim and >20% copay;
data all;
set N_old_cdw(keep=C1) N_g1MH(keep=C2) N_g1MH_hicopay(keep=C3);
run;
结果表格 all 是3行的, 麻烦哪位有好的想法实现我要的表格, |
|