Thank you ChrisNZ. The log did come out from the code. I upload some pictures, which shows more clearly.
Thank you again!
Have you tried commenting out the 2 lines as suggested?
Thank you ChrisNZ. I have tried commenting out the 2 lines as you suggested. The warnings and errors did disappear and come a result. However, the result is not as the paper showed and this warning come out:
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
Thank you again!
This warning only concerns character variables, and it is very clear:
You try to read data that contains characters that do not exist in your encoding mode. Most likely attempting to read UFT8 data in a wlatin session (you can run proc contents to check the data set's encoding). The only way to fix this is that your SAS session must use a different encoding. This is an option set at start-up, so if you use EG or similar, the SAS administrator is the person that can make that change.
Thank you ChrisNZ, I upload the whole log so that it can be more clear to see.
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M4)
Licensed to KYOTO UNIVERSITY -SCSK, Site 10209371.
NOTE: This session is executing on the X64_10HOME platform.
NOTE: Updated analytical products:
SAS/STAT 14.2
SAS/ETS 14.2
SAS/OR 14.2
SAS/IML 14.2
SAS/QC 14.2
NOTE: Additional host information:
X64_10HOME WIN 10.0.19041 Workstation
NOTE: SAS initialization used:
real time 1.42 seconds
cpu time 1.04 seconds
1 libname data "C:\Research 2\datacheck\datacheck1";
NOTE: Libref DATA was successfully assigned as follows:
Engine: V9
Physical Name: C:\Research 2\datacheck\datacheck1
2 options mprint;
3 %INCLUDE 'ADJSURV.sas';
711 %_ADJSURV (data=data.cox
712 , time=time
713 , event=event
714 , group=group
715 , x=sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
715 ! comorbidities6 concurrent1 concurrent2 concurrent previous after
716 , model=1
717 , out=data.coxout);
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): proc means data=data.cox noprint;
MPRINT(_ADJSURV): var group;
MPRINT(_ADJSURV): output out=maxout max(group)=numgroup;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set DATA.COX.
NOTE: The data set WORK.MAXOUT has 1 observations and 3 variables.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set maxout;
MPRINT(_ADJSURV): call symput('numgroup', numgroup);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
1072:162
NOTE: There were 1 observations read from the data set WORK.MAXOUT.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: Writing HTML Body file: sashtml.htm
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): read all var {sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after}
into x;
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): numcov=ncol(x);
MPRINT(_ADJSURV): create ncovout from numcov[colname='numcov'];
MPRINT(_ADJSURV): append from numcov;
MPRINT(_ADJSURV): close ncovout;
NOTE: The data set WORK.NCOVOUT has 1 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.55 seconds
cpu time 0.39 seconds
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set ncovout;
MPRINT(_ADJSURV): call symput('numcov', numcov);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
2:197
NOTE: There were 1 observations read from the data set WORK.NCOVOUT.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): read all var {time} into time;
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
MPRINT(_ADJSURV): read all var {event} into event;
MPRINT(_ADJSURV): read all var {group} into group;
MPRINT(_ADJSURV): read all var {sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after}
into x;
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): out=time||event||group||x;
MPRINT(_ADJSURV): names={'time' 'event' 'strata' "z1" "z2" "z3" "z4" "z5" "z6" "z7" "z8" "z9"
"z10" "z11" "z12" "z13"};
MPRINT(_ADJSURV): create indata from out[colname=names];
MPRINT(_ADJSURV): append from out;
MPRINT(_ADJSURV): close indata;
NOTE: The data set WORK.INDATA has 979 observations and 16 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds
MPRINT(_ADJSURV): proc sort data=indata;
MPRINT(_ADJSURV): by descending time descending event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.INDATA has 979 observations and 16 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): data alltime;
MPRINT(_ADJSURV): set indata (keep=time event);
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): drop event;
MPRINT(_ADJSURV): if first.time;
MPRINT(_ADJSURV): if event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=alltime;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc phreg data=indata covout outest=best noprint;
MPRINT(_ADJSURV): model time*event(0)= z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13;
MPRINT(_ADJSURV): strata strata;
MPRINT(_ADJSURV): output out=coxout xbeta=zb;
MPRINT(_ADJSURV): run;
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: The data set WORK.BEST has 14 observations and 18 variables.
NOTE: The data set WORK.COXOUT has 979 observations and 17 variables.
NOTE: PROCEDURE PHREG used (Total process time):
real time 0.12 seconds
cpu time 0.07 seconds
MPRINT(_ADJSURV): proc sort data=coxout;
MPRINT(_ADJSURV): by strata descending time;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.COXOUT.
NOTE: The data set WORK.COXOUT has 979 observations and 17 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): data best sigma;
MPRINT(_ADJSURV): set best;
MPRINT(_ADJSURV): if _type_='PARMS' then output best;
MPRINT(_ADJSURV): else if _type_='COV' then output sigma;
MPRINT(_ADJSURV): run;
NOTE: There were 14 observations read from the data set WORK.BEST.
NOTE: The data set WORK.BEST has 1 observations and 18 variables.
NOTE: The data set WORK.SIGMA has 13 observations and 18 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): data riskset1;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=1;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 98 observations read from the data set WORK.COXOUT.
WHERE strata=1;
NOTE: The data set WORK.RISKSET1 has 35 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc sort data=riskset1;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 35 observations read from the data set WORK.RISKSET1.
NOTE: The data set WORK.RISKSET1 has 35 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=1 & event=1;
MPRINT(_ADJSURV): table time/out=dcount1;
MPRINT(_ADJSURV): run;
NOTE: There were 41 observations read from the data set WORK.INDATA.
WHERE (strata=1) and (event=1);
NOTE: The data set WORK.DCOUNT1 has 34 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset1;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset1 dcount1 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 35 observations read from the data set WORK.RISKSET1.
NOTE: There were 34 observations read from the data set WORK.DCOUNT1.
NOTE: The data set WORK.RISKSET1 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv1 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv1;
NOTE: The data set WORK.SURV1 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.65 seconds
cpu time 0.62 seconds
MPRINT(_ADJSURV): data riskset2;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=2;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 148 observations read from the data set WORK.COXOUT.
WHERE strata=2;
NOTE: The data set WORK.RISKSET2 has 29 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc sort data=riskset2;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 29 observations read from the data set WORK.RISKSET2.
NOTE: The data set WORK.RISKSET2 has 29 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=2 & event=1;
MPRINT(_ADJSURV): table time/out=dcount2;
MPRINT(_ADJSURV): run;
NOTE: There were 37 observations read from the data set WORK.INDATA.
WHERE (strata=2) and (event=1);
NOTE: The data set WORK.DCOUNT2 has 28 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset2;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset2 dcount2 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 29 observations read from the data set WORK.RISKSET2.
NOTE: There were 28 observations read from the data set WORK.DCOUNT2.
NOTE: The data set WORK.RISKSET2 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv2 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv2;
NOTE: The data set WORK.SURV2 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.59 seconds
cpu time 0.54 seconds
MPRINT(_ADJSURV): data riskset3;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=3;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 86 observations read from the data set WORK.COXOUT.
WHERE strata=3;
NOTE: The data set WORK.RISKSET3 has 34 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc sort data=riskset3;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 34 observations read from the data set WORK.RISKSET3.
NOTE: The data set WORK.RISKSET3 has 34 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=3 & event=1;
MPRINT(_ADJSURV): table time/out=dcount3;
MPRINT(_ADJSURV): run;
NOTE: There were 38 observations read from the data set WORK.INDATA.
WHERE (strata=3) and (event=1);
NOTE: The data set WORK.DCOUNT3 has 33 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset3;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset3 dcount3 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 34 observations read from the data set WORK.RISKSET3.
NOTE: There were 33 observations read from the data set WORK.DCOUNT3.
NOTE: The data set WORK.RISKSET3 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv3 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv3;
NOTE: The data set WORK.SURV3 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.59 seconds
cpu time 0.56 seconds
MPRINT(_ADJSURV): data riskset4;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=4;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 647 observations read from the data set WORK.COXOUT.
WHERE strata=4;
NOTE: The data set WORK.RISKSET4 has 128 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc sort data=riskset4;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 128 observations read from the data set WORK.RISKSET4.
NOTE: The data set WORK.RISKSET4 has 128 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=4 & event=1;
MPRINT(_ADJSURV): table time/out=dcount4;
MPRINT(_ADJSURV): run;
NOTE: There were 258 observations read from the data set WORK.INDATA.
WHERE (strata=4) and (event=1);
NOTE: The data set WORK.DCOUNT4 has 127 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.07 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset4;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset4 dcount4 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 128 observations read from the data set WORK.RISKSET4.
NOTE: There were 127 observations read from the data set WORK.DCOUNT4.
NOTE: The data set WORK.RISKSET4 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv4 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv4;
NOTE: The data set WORK.SURV4 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.63 seconds
cpu time 0.71 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov12 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov12;
NOTE: The data set WORK.COV12 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.14 seconds
cpu time 1.12 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov13 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov13;
NOTE: The data set WORK.COV13 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.19 seconds
cpu time 1.14 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov14 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov14;
NOTE: The data set WORK.COV14 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.19 seconds
cpu time 1.26 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov23 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov23;
NOTE: The data set WORK.COV23 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.18 seconds
cpu time 1.23 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov24 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov24;
NOTE: The data set WORK.COV24 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.20 seconds
cpu time 1.14 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov34 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov34;
NOTE: The data set WORK.COV34 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.14 seconds
cpu time 1.12 seconds
MPRINT(_ADJSURV): data mout;
MPRINT(_ADJSURV): merge surv1 (rename=(surv=surv1 se=se1)) surv2 (rename=(surv=surv2 se=se2))
surv3 (rename=(surv=surv3 se=se3)) surv4 (rename=(surv=surv4 se=se4)) cov12 (rename=(se=se12))
cov13 (rename=(se=se13)) cov14 (rename=(se=se14)) cov23 (rename=(se=se23)) cov24
(rename=(se=se24)) cov34 (rename=(se=se34));
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.SURV1.
NOTE: There were 166 observations read from the data set WORK.SURV2.
NOTE: There were 166 observations read from the data set WORK.SURV3.
NOTE: There were 166 observations read from the data set WORK.SURV4.
NOTE: There were 166 observations read from the data set WORK.COV12.
NOTE: There were 166 observations read from the data set WORK.COV13.
NOTE: There were 166 observations read from the data set WORK.COV14.
NOTE: There were 166 observations read from the data set WORK.COV23.
NOTE: There were 166 observations read from the data set WORK.COV24.
NOTE: There were 166 observations read from the data set WORK.COV34.
NOTE: The data set WORK.MOUT has 166 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data data.coxout;
MPRINT(_ADJSURV): time=0;
MPRINT(_ADJSURV): surv1=1;
MPRINT(_ADJSURV): se1=0;
MPRINT(_ADJSURV): se12=0;
MPRINT(_ADJSURV): se13=0;
MPRINT(_ADJSURV): se14=0;
MPRINT(_ADJSURV): surv2=1;
MPRINT(_ADJSURV): se2=0;
MPRINT(_ADJSURV): se23=0;
MPRINT(_ADJSURV): se24=0;
MPRINT(_ADJSURV): surv3=1;
MPRINT(_ADJSURV): se3=0;
MPRINT(_ADJSURV): se34=0;
MPRINT(_ADJSURV): surv4=1;
MPRINT(_ADJSURV): se4=0;
MPRINT(_ADJSURV): output;
MPRINT(_ADJSURV): run;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
NOTE: The data set DATA.COXOUT has 1 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data data.coxout;
MPRINT(_ADJSURV): set data.coxout mout;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
NOTE: There were 1 observations read from the data set DATA.COXOUT.
NOTE: There were 166 observations read from the data set WORK.MOUT.
NOTE: The data set DATA.COXOUT has 167 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
Thank you again!
> I upload the whole log so that it can be more clear to see.
There are no errors so the code runs as expected.
Regarding the encoding, I see you run Win10Home, so you can probably change the start-up encoding (use the ENCODING= system option).
If the results are not what you expect, this might be due to the 2 missing macros. You should contact the authors. Their email address is in https://www.mcw.edu/-/media/MCW/Departments/Biostatistics/adjustedsurvivalcurves.pdf?la=en and can probably be found online.
Thank you ChrisNZ for sharing the URL, I will contact the authors.
I will also try the ENCODING= system option.
Thank you again!
Thank you ChrisNZ. I also have run the following code.
proc contents data=data.cox; run;
The result is
Encoding shift-jis Japanese (SJIS)
Thank you again!
Please do not post logs as screen captures. Please copy the entire log as text and paste it into the window that appears when you click on the </> icon. DO NOT SKIP THIS STEP.
In addition, to help with debugging, you should run this command before you run the macro:
options mprint;
However, I agree with the above commenters, there are macros being referred to that are not being defined in your code. You need to straighten this out first; it's hard to help you when your code call a macro that SAS (and no one in this conversation) doesn't know about.
Thank you PaigeMiller. I have tried
options mprint;but it did not help.
I have tried commenting out the 2 lines as ChrisNZ suggested. The warnings and errors did disappear and come a result. However, the result is not as the paper showed and this warning come out:
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
Thank you again!
options mprint;
will not fix the problems
It is a good thing to use when running macros because more helpful information is written to the log.
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data contains characters that are not representable in the new encoding or truncation occurred during transcoding.
Please DO NOT show us partial logs, disconnected from the code. Please show us the entire log for this PROC or DATA step so we can see the code as it appears in the LOG, plus all NOTEs, WARNINGs and ERRORs, exactly as they appear in the log.
Thank you PaigeMiller. I have used
options mprint;and upload the whole log now. The log is before I comment out the two lines.
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M4)
Licensed to KYOTO UNIVERSITY -SCSK, Site 10209371.
NOTE: This session is executing on the X64_10HOME platform.
NOTE: Updated analytical products:
SAS/STAT 14.2
SAS/ETS 14.2
SAS/OR 14.2
SAS/IML 14.2
SAS/QC 14.2
NOTE: Additional host information:
X64_10HOME WIN 10.0.19041 Workstation
NOTE: SAS initialization used:
real time 1.61 seconds
cpu time 1.13 seconds
1 libname data "C:\Research 2\datacheck\datacheck1";
NOTE: Libref DATA was successfully assigned as follows:
Engine: V9
Physical Name: C:\Research 2\datacheck\datacheck1
2 options mprint;
3 %INCLUDE 'ADJSURV.sas';
711 %_ADJSURV (data=data.cox
712 , time=time
713 , event=event
714 , group=group
715 , x=sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
715 ! comorbidities6 concurrent1 concurrent2 concurrent previous after
716 , model=1
717 , out=data.coxout);
NOTE: Line generated by the invoked macro "_ADJSURV".
1 %_require(&data &time &event &group &out &x)
-
180
WARNING: Apparent invocation of macro _REQUIRE not resolved.
WARNING: Apparent invocation of macro _LIST not resolved.
MPRINT(_ADJSURV): %_require(data.cox time event group data.coxout sex1 age1 comorbidities1
comorbidities2 comorbidities3 comorbidities4 comorbidities5 comorbidities6 concurrent1
concurrent2 concurrent previous after) proc means data=data.cox noprint;
ERROR 180-322: Statement is not valid or it is used out of proper order.
NOTE: Line generated by the invoked macro "_ADJSURV".
3 proc means data=&inputdata noprint; var &group; output out=maxout
---
180
3 ! max(&group)=numgroup; run; data _null_; set maxout; call symput('numgroup',
3 ! numgroup); run; proc iml; use &inputdata; read all var {&covlist} into x;
3 ! close
ERROR 180-322: Statement is not valid or it is used out of proper order.
MPRINT(_ADJSURV): var group;
NOTE: Line generated by the invoked macro "_ADJSURV".
3 proc means data=&inputdata noprint; var &group; output out=maxout
------
180
3 ! max(&group)=numgroup; run; data _null_; set maxout; call symput('numgroup',
3 ! numgroup); run; proc iml; use &inputdata; read all var {&covlist} into x;
3 ! close
ERROR 180-322: Statement is not valid or it is used out of proper order.
MPRINT(_ADJSURV): output out=maxout max(group)=numgroup;
MPRINT(_ADJSURV): run;
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set maxout;
ERROR: File WORK.MAXOUT.DATA does not exist.
MPRINT(_ADJSURV): call symput('numgroup', numgroup);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
1082:162
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: Writing HTML Body file: sashtml.htm
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
NOTE: Line generated by the macro variable "COVLIST".
1 %_list(sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
-
22
200
1 ! comorbidities6 concurrent1 concurrent2 concurrent previous after)
WARNING: Apparent invocation of macro _LIST not resolved.
MPRINT(_ADJSURV): read all var {%_list(sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after)}
into x;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,
a numeric constant, a datetime constant, a missing value, (, (|, ), *, ',', -, =,
[, |, }.
ERROR 200-322: The symbol is not recognized and will be ignored.
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): numcov=ncol(x);
MPRINT(_ADJSURV): create ncovout from numcov[colname='numcov'];
MPRINT(_ADJSURV): append from numcov;
MPRINT(_ADJSURV): close ncovout;
NOTE: The data set WORK.NCOVOUT has 1 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.60 seconds
cpu time 0.32 seconds
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set ncovout;
MPRINT(_ADJSURV): call symput('numcov', numcov);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
4:197
NOTE: There were 1 observations read from the data set WORK.NCOVOUT.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): read all var {time} into time;
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
MPRINT(_ADJSURV): read all var {event} into event;
MPRINT(_ADJSURV): read all var {group} into group;
NOTE: Line generated by the macro variable "COVLIST".
1 %_list(sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
-
22
200
1 ! comorbidities6 concurrent1 concurrent2 concurrent previous after)
WARNING: Apparent invocation of macro _LIST not resolved.
MPRINT(_ADJSURV): read all var {%_list(sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after)}
into x;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,
a numeric constant, a datetime constant, a missing value, (, (|, ), *, ',', -, =,
[, |, }.
ERROR 200-322: The symbol is not recognized and will be ignored.
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): out=time||event||group||x;
MPRINT(_ADJSURV): names={'time' 'event' 'strata'};
MPRINT(_ADJSURV): create indata from out[colname=names];
MPRINT(_ADJSURV): append from out;
MPRINT(_ADJSURV): close indata;
NOTE: The data set WORK.INDATA has 979 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.13 seconds
cpu time 0.07 seconds
MPRINT(_ADJSURV): proc sort data=indata;
MPRINT(_ADJSURV): by descending time descending event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.INDATA has 979 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): data alltime;
MPRINT(_ADJSURV): set indata (keep=time event);
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): drop event;
MPRINT(_ADJSURV): if first.time;
MPRINT(_ADJSURV): if event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc sort data=alltime;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): proc phreg data=indata covout outest=best noprint;
MPRINT(_ADJSURV): model time*event(0)=;
MPRINT(_ADJSURV): strata strata;
MPRINT(_ADJSURV): output out=coxout xbeta=zb;
MPRINT(_ADJSURV): run;
NOTE: There are no explanatory variables in the MODEL statement.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: The data set WORK.BEST has 1 observations and 5 variables.
NOTE: The data set WORK.COXOUT has 979 observations and 4 variables.
NOTE: PROCEDURE PHREG used (Total process time):
real time 0.11 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc sort data=coxout;
MPRINT(_ADJSURV): by strata descending time;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.COXOUT.
NOTE: The data set WORK.COXOUT has 979 observations and 4 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): data best sigma;
MPRINT(_ADJSURV): set best;
MPRINT(_ADJSURV): if _type_='PARMS' then output best;
MPRINT(_ADJSURV): else if _type_='COV' then output sigma;
MPRINT(_ADJSURV): run;
NOTE: There were 1 observations read from the data set WORK.BEST.
NOTE: The data set WORK.BEST has 1 observations and 5 variables.
NOTE: The data set WORK.SIGMA has 0 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
ERROR: %EVAL function has no expression to evaluate, or %IF statement has no condition.
ERROR: The %TO value of the %DO GROUP loop is invalid.
ERROR: The macro _ADJSURV will stop executing.
And here is the log after I comment out the 2 lines:
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M4)
Licensed to KYOTO UNIVERSITY -SCSK, Site 10209371.
NOTE: This session is executing on the X64_10HOME platform.
NOTE: Updated analytical products:
SAS/STAT 14.2
SAS/ETS 14.2
SAS/OR 14.2
SAS/IML 14.2
SAS/QC 14.2
NOTE: Additional host information:
X64_10HOME WIN 10.0.19041 Workstation
NOTE: SAS initialization used:
real time 1.49 seconds
cpu time 0.90 seconds
1 libname data "C:\Research 2\datacheck\datacheck1";
NOTE: Libref DATA was successfully assigned as follows:
Engine: V9
Physical Name: C:\Research 2\datacheck\datacheck1
2 options mprint;
3 %INCLUDE 'ADJSURV.sas';
711 %_ADJSURV (data=data.cox
712 , time=time
713 , event=event
714 , group=group
715 , x=sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
715 ! comorbidities6 concurrent1 concurrent2 concurrent previous after
716 , model=1
717 , out=data.coxout);
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): proc means data=data.cox noprint;
MPRINT(_ADJSURV): var group;
MPRINT(_ADJSURV): output out=maxout max(group)=numgroup;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set DATA.COX.
NOTE: The data set WORK.MAXOUT has 1 observations and 3 variables.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set maxout;
MPRINT(_ADJSURV): call symput('numgroup', numgroup);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
1072:162
NOTE: There were 1 observations read from the data set WORK.MAXOUT.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: Writing HTML Body file: sashtml.htm
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): read all var {sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after}
into x;
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): numcov=ncol(x);
MPRINT(_ADJSURV): create ncovout from numcov[colname='numcov'];
MPRINT(_ADJSURV): append from numcov;
MPRINT(_ADJSURV): close ncovout;
NOTE: The data set WORK.NCOVOUT has 1 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.57 seconds
cpu time 0.34 seconds
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set ncovout;
MPRINT(_ADJSURV): call symput('numcov', numcov);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
2:197
NOTE: There were 1 observations read from the data set WORK.NCOVOUT.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): read all var {time} into time;
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
MPRINT(_ADJSURV): read all var {event} into event;
MPRINT(_ADJSURV): read all var {group} into group;
MPRINT(_ADJSURV): read all var {sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after}
into x;
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): out=time||event||group||x;
MPRINT(_ADJSURV): names={'time' 'event' 'strata' "z1" "z2" "z3" "z4" "z5" "z6" "z7" "z8" "z9"
"z10" "z11" "z12" "z13"};
MPRINT(_ADJSURV): create indata from out[colname=names];
MPRINT(_ADJSURV): append from out;
MPRINT(_ADJSURV): close indata;
NOTE: The data set WORK.INDATA has 979 observations and 16 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.08 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc sort data=indata;
MPRINT(_ADJSURV): by descending time descending event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.INDATA has 979 observations and 16 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): data alltime;
MPRINT(_ADJSURV): set indata (keep=time event);
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): drop event;
MPRINT(_ADJSURV): if first.time;
MPRINT(_ADJSURV): if event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=alltime;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): proc phreg data=indata covout outest=best noprint;
MPRINT(_ADJSURV): model time*event(0)= z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13;
MPRINT(_ADJSURV): strata strata;
MPRINT(_ADJSURV): output out=coxout xbeta=zb;
MPRINT(_ADJSURV): run;
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: The data set WORK.BEST has 14 observations and 18 variables.
NOTE: The data set WORK.COXOUT has 979 observations and 17 variables.
NOTE: PROCEDURE PHREG used (Total process time):
real time 0.12 seconds
cpu time 0.06 seconds
MPRINT(_ADJSURV): proc sort data=coxout;
MPRINT(_ADJSURV): by strata descending time;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.COXOUT.
NOTE: The data set WORK.COXOUT has 979 observations and 17 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): data best sigma;
MPRINT(_ADJSURV): set best;
MPRINT(_ADJSURV): if _type_='PARMS' then output best;
MPRINT(_ADJSURV): else if _type_='COV' then output sigma;
MPRINT(_ADJSURV): run;
NOTE: There were 14 observations read from the data set WORK.BEST.
NOTE: The data set WORK.BEST has 1 observations and 18 variables.
NOTE: The data set WORK.SIGMA has 13 observations and 18 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data riskset1;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=1;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 98 observations read from the data set WORK.COXOUT.
WHERE strata=1;
NOTE: The data set WORK.RISKSET1 has 35 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=riskset1;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 35 observations read from the data set WORK.RISKSET1.
NOTE: The data set WORK.RISKSET1 has 35 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=1 & event=1;
MPRINT(_ADJSURV): table time/out=dcount1;
MPRINT(_ADJSURV): run;
NOTE: There were 41 observations read from the data set WORK.INDATA.
WHERE (strata=1) and (event=1);
NOTE: The data set WORK.DCOUNT1 has 34 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.08 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset1;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset1 dcount1 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 35 observations read from the data set WORK.RISKSET1.
NOTE: There were 34 observations read from the data set WORK.DCOUNT1.
NOTE: The data set WORK.RISKSET1 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv1 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv1;
NOTE: The data set WORK.SURV1 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.57 seconds
cpu time 0.54 seconds
MPRINT(_ADJSURV): data riskset2;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=2;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 148 observations read from the data set WORK.COXOUT.
WHERE strata=2;
NOTE: The data set WORK.RISKSET2 has 29 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=riskset2;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 29 observations read from the data set WORK.RISKSET2.
NOTE: The data set WORK.RISKSET2 has 29 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=2 & event=1;
MPRINT(_ADJSURV): table time/out=dcount2;
MPRINT(_ADJSURV): run;
NOTE: There were 37 observations read from the data set WORK.INDATA.
WHERE (strata=2) and (event=1);
NOTE: The data set WORK.DCOUNT2 has 28 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset2;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset2 dcount2 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 29 observations read from the data set WORK.RISKSET2.
NOTE: There were 28 observations read from the data set WORK.DCOUNT2.
NOTE: The data set WORK.RISKSET2 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv2 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv2;
NOTE: The data set WORK.SURV2 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.60 seconds
cpu time 0.59 seconds
MPRINT(_ADJSURV): data riskset3;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=3;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 86 observations read from the data set WORK.COXOUT.
WHERE strata=3;
NOTE: The data set WORK.RISKSET3 has 34 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=riskset3;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 34 observations read from the data set WORK.RISKSET3.
NOTE: The data set WORK.RISKSET3 has 34 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=3 & event=1;
MPRINT(_ADJSURV): table time/out=dcount3;
MPRINT(_ADJSURV): run;
NOTE: There were 38 observations read from the data set WORK.INDATA.
WHERE (strata=3) and (event=1);
NOTE: The data set WORK.DCOUNT3 has 33 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset3;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset3 dcount3 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 34 observations read from the data set WORK.RISKSET3.
NOTE: There were 33 observations read from the data set WORK.DCOUNT3.
NOTE: The data set WORK.RISKSET3 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv3 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv3;
NOTE: The data set WORK.SURV3 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.61 seconds
cpu time 0.59 seconds
MPRINT(_ADJSURV): data riskset4;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=4;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 647 observations read from the data set WORK.COXOUT.
WHERE strata=4;
NOTE: The data set WORK.RISKSET4 has 128 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=riskset4;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 128 observations read from the data set WORK.RISKSET4.
NOTE: The data set WORK.RISKSET4 has 128 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=4 & event=1;
MPRINT(_ADJSURV): table time/out=dcount4;
MPRINT(_ADJSURV): run;
NOTE: There were 258 observations read from the data set WORK.INDATA.
WHERE (strata=4) and (event=1);
NOTE: The data set WORK.DCOUNT4 has 127 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.07 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset4;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset4 dcount4 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 128 observations read from the data set WORK.RISKSET4.
NOTE: There were 127 observations read from the data set WORK.DCOUNT4.
NOTE: The data set WORK.RISKSET4 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv4 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv4;
NOTE: The data set WORK.SURV4 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.58 seconds
cpu time 0.50 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov12 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov12;
NOTE: The data set WORK.COV12 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.08 seconds
cpu time 1.07 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov13 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov13;
NOTE: The data set WORK.COV13 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.08 seconds
cpu time 1.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov14 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov14;
NOTE: The data set WORK.COV14 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.24 seconds
cpu time 1.20 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov23 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov23;
NOTE: The data set WORK.COV23 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.16 seconds
cpu time 1.07 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov24 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov24;
NOTE: The data set WORK.COV24 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.15 seconds
cpu time 1.14 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov34 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov34;
NOTE: The data set WORK.COV34 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.09 seconds
cpu time 1.04 seconds
MPRINT(_ADJSURV): data mout;
MPRINT(_ADJSURV): merge surv1 (rename=(surv=surv1 se=se1)) surv2 (rename=(surv=surv2 se=se2))
surv3 (rename=(surv=surv3 se=se3)) surv4 (rename=(surv=surv4 se=se4)) cov12 (rename=(se=se12))
cov13 (rename=(se=se13)) cov14 (rename=(se=se14)) cov23 (rename=(se=se23)) cov24
(rename=(se=se24)) cov34 (rename=(se=se34));
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.SURV1.
NOTE: There were 166 observations read from the data set WORK.SURV2.
NOTE: There were 166 observations read from the data set WORK.SURV3.
NOTE: There were 166 observations read from the data set WORK.SURV4.
NOTE: There were 166 observations read from the data set WORK.COV12.
NOTE: There were 166 observations read from the data set WORK.COV13.
NOTE: There were 166 observations read from the data set WORK.COV14.
NOTE: There were 166 observations read from the data set WORK.COV23.
NOTE: There were 166 observations read from the data set WORK.COV24.
NOTE: There were 166 observations read from the data set WORK.COV34.
NOTE: The data set WORK.MOUT has 166 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data data.coxout;
MPRINT(_ADJSURV): time=0;
MPRINT(_ADJSURV): surv1=1;
MPRINT(_ADJSURV): se1=0;
MPRINT(_ADJSURV): se12=0;
MPRINT(_ADJSURV): se13=0;
MPRINT(_ADJSURV): se14=0;
MPRINT(_ADJSURV): surv2=1;
MPRINT(_ADJSURV): se2=0;
MPRINT(_ADJSURV): se23=0;
MPRINT(_ADJSURV): se24=0;
MPRINT(_ADJSURV): surv3=1;
MPRINT(_ADJSURV): se3=0;
MPRINT(_ADJSURV): se34=0;
MPRINT(_ADJSURV): surv4=1;
MPRINT(_ADJSURV): se4=0;
MPRINT(_ADJSURV): output;
MPRINT(_ADJSURV): run;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
NOTE: The data set DATA.COXOUT has 1 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data data.coxout;
MPRINT(_ADJSURV): set data.coxout mout;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
NOTE: There were 1 observations read from the data set DATA.COXOUT.
NOTE: There were 166 observations read from the data set WORK.MOUT.
NOTE: The data set DATA.COXOUT has 167 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
Thank you for your help!
Thank you KurtBremser. The log does come from the code as posted. I upload some pictures, which shows more clearly.
Thank you again!
When posting logs (and code) use the Insert Code or Insert SAS Code icons in the forum editor so that you get a popup window to paste the lines of text. This will preserve the formatting.
Work your way through the errors starting with the first. Make sure to turn on the MPRINT option so you can see the SAS code the macro generated so you know what code the errors are talking.
1 %require(&data &time &event &group &out &x)
-
180
WARNING: Apparent invocation of macro REQUIRE not resolved.
WARNING: Apparent invocation of macro _LIST not resolved.
ERROR 180-322: Statement is not valid or it is used out of proper order.
3 proc means data=&inputdata noprint; var &group; output out=maxout
---
180
3 ! max(&group)=numgroup; run; data _null_; set maxout; call symput('numgroup',
3 ! numgroup); run; proc iml; use &inputdata; read all var {&covlist} into x;
3 ! close
ERROR 180-322: Statement is not valid or it is used out of proper order.
3 proc means data=&inputdata noprint; var &group; output out=maxout
------
180
So first figure out why the macros you are calling do not exist. If you don't have those macros then try to figure out from the code whether you really need them. Perhaps you can skip that step?
The next error is hard to debug since you didn't paste the text into a code box and the underlines no longer align to where SAS is detecting the error. It looks perhaps like you missed a semi-colon and so have commented out the PROC statement so the other statements are no longer valid.
Thank you Tom. I have used MPRINT option and upload the whole log now. The log is before I comment out the two warning lines.
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M4)
Licensed to KYOTO UNIVERSITY -SCSK, Site 10209371.
NOTE: This session is executing on the X64_10HOME platform.
NOTE: Updated analytical products:
SAS/STAT 14.2
SAS/ETS 14.2
SAS/OR 14.2
SAS/IML 14.2
SAS/QC 14.2
NOTE: Additional host information:
X64_10HOME WIN 10.0.19041 Workstation
NOTE: SAS initialization used:
real time 1.42 seconds
cpu time 1.01 seconds
1 libname data "C:\Research 2\datacheck\datacheck1";
NOTE: Libref DATA was successfully assigned as follows:
Engine: V9
Physical Name: C:\Research 2\datacheck\datacheck1
2 options mprint;
3 %INCLUDE 'ADJSURV.sas';
711 %_ADJSURV (data=data.cox
712 , time=time
713 , event=event
714 , group=group
715 , x=sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
715 ! comorbidities6 concurrent1 concurrent2 concurrent previous after
716 , model=1
717 , out=data.coxout);
NOTE: Line generated by the invoked macro "_ADJSURV".
1 %_require(&data &time &event &group &out &x)
-
180
WARNING: Apparent invocation of macro _REQUIRE not resolved.
WARNING: Apparent invocation of macro _LIST not resolved.
MPRINT(_ADJSURV): %_require(data.cox time event group data.coxout sex1 age1 comorbidities1
comorbidities2 comorbidities3 comorbidities4 comorbidities5 comorbidities6 concurrent1
concurrent2 concurrent previous after) proc means data=data.cox noprint;
ERROR 180-322: Statement is not valid or it is used out of proper order.
NOTE: Line generated by the invoked macro "_ADJSURV".
3 proc means data=&inputdata noprint; var &group; output out=maxout
---
180
3 ! max(&group)=numgroup; run; data _null_; set maxout; call symput('numgroup',
3 ! numgroup); run; proc iml; use &inputdata; read all var {&covlist} into x;
3 ! close
ERROR 180-322: Statement is not valid or it is used out of proper order.
MPRINT(_ADJSURV): var group;
NOTE: Line generated by the invoked macro "_ADJSURV".
3 proc means data=&inputdata noprint; var &group; output out=maxout
------
180
3 ! max(&group)=numgroup; run; data _null_; set maxout; call symput('numgroup',
3 ! numgroup); run; proc iml; use &inputdata; read all var {&covlist} into x;
3 ! close
ERROR 180-322: Statement is not valid or it is used out of proper order.
MPRINT(_ADJSURV): output out=maxout max(group)=numgroup;
MPRINT(_ADJSURV): run;
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set maxout;
ERROR: File WORK.MAXOUT.DATA does not exist.
MPRINT(_ADJSURV): call symput('numgroup', numgroup);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
1082:162
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: Writing HTML Body file: sashtml.htm
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
NOTE: Line generated by the macro variable "COVLIST".
1 %_list(sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
-
22
200
1 ! comorbidities6 concurrent1 concurrent2 concurrent previous after)
WARNING: Apparent invocation of macro _LIST not resolved.
MPRINT(_ADJSURV): read all var {%_list(sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after)}
into x;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,
a numeric constant, a datetime constant, a missing value, (, (|, ), *, ',', -, =,
[, |, }.
ERROR 200-322: The symbol is not recognized and will be ignored.
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): numcov=ncol(x);
MPRINT(_ADJSURV): create ncovout from numcov[colname='numcov'];
MPRINT(_ADJSURV): append from numcov;
MPRINT(_ADJSURV): close ncovout;
NOTE: The data set WORK.NCOVOUT has 1 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.59 seconds
cpu time 0.29 seconds
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set ncovout;
MPRINT(_ADJSURV): call symput('numcov', numcov);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
4:197
NOTE: There were 1 observations read from the data set WORK.NCOVOUT.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): read all var {time} into time;
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
MPRINT(_ADJSURV): read all var {event} into event;
MPRINT(_ADJSURV): read all var {group} into group;
NOTE: Line generated by the macro variable "COVLIST".
1 %_list(sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
-
22
200
1 ! comorbidities6 concurrent1 concurrent2 concurrent previous after)
WARNING: Apparent invocation of macro _LIST not resolved.
MPRINT(_ADJSURV): read all var {%_list(sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after)}
into x;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,
a numeric constant, a datetime constant, a missing value, (, (|, ), *, ',', -, =,
[, |, }.
ERROR 200-322: The symbol is not recognized and will be ignored.
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): out=time||event||group||x;
MPRINT(_ADJSURV): names={'time' 'event' 'strata'};
MPRINT(_ADJSURV): create indata from out[colname=names];
MPRINT(_ADJSURV): append from out;
MPRINT(_ADJSURV): close indata;
NOTE: The data set WORK.INDATA has 979 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.08 seconds
cpu time 0.06 seconds
MPRINT(_ADJSURV): proc sort data=indata;
MPRINT(_ADJSURV): by descending time descending event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.INDATA has 979 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): data alltime;
MPRINT(_ADJSURV): set indata (keep=time event);
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): drop event;
MPRINT(_ADJSURV): if first.time;
MPRINT(_ADJSURV): if event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=alltime;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): proc phreg data=indata covout outest=best noprint;
MPRINT(_ADJSURV): model time*event(0)=;
MPRINT(_ADJSURV): strata strata;
MPRINT(_ADJSURV): output out=coxout xbeta=zb;
MPRINT(_ADJSURV): run;
NOTE: There are no explanatory variables in the MODEL statement.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: The data set WORK.BEST has 1 observations and 5 variables.
NOTE: The data set WORK.COXOUT has 979 observations and 4 variables.
NOTE: PROCEDURE PHREG used (Total process time):
real time 0.12 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc sort data=coxout;
MPRINT(_ADJSURV): by strata descending time;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.COXOUT.
NOTE: The data set WORK.COXOUT has 979 observations and 4 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): data best sigma;
MPRINT(_ADJSURV): set best;
MPRINT(_ADJSURV): if _type_='PARMS' then output best;
MPRINT(_ADJSURV): else if _type_='COV' then output sigma;
MPRINT(_ADJSURV): run;
NOTE: There were 1 observations read from the data set WORK.BEST.
NOTE: The data set WORK.BEST has 1 observations and 5 variables.
NOTE: The data set WORK.SIGMA has 0 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
ERROR: %EVAL function has no expression to evaluate, or %IF statement has no condition.
ERROR: The %TO value of the %DO GROUP loop is invalid.
ERROR: The macro _ADJSURV will stop executing.
And this log is after I comment out the two warning lines.
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M4)
Licensed to KYOTO UNIVERSITY -SCSK, Site 10209371.
NOTE: This session is executing on the X64_10HOME platform.
NOTE: Updated analytical products:
SAS/STAT 14.2
SAS/ETS 14.2
SAS/OR 14.2
SAS/IML 14.2
SAS/QC 14.2
NOTE: Additional host information:
X64_10HOME WIN 10.0.19041 Workstation
NOTE: SAS initialization used:
real time 1.49 seconds
cpu time 0.90 seconds
1 libname data "C:\Research 2\datacheck\datacheck1";
NOTE: Libref DATA was successfully assigned as follows:
Engine: V9
Physical Name: C:\Research 2\datacheck\datacheck1
2 options mprint;
3 %INCLUDE 'ADJSURV.sas';
711 %_ADJSURV (data=data.cox
712 , time=time
713 , event=event
714 , group=group
715 , x=sex1 age1 comorbidities1 comorbidities2 comorbidities3 comorbidities4 comorbidities5
715 ! comorbidities6 concurrent1 concurrent2 concurrent previous after
716 , model=1
717 , out=data.coxout);
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): proc means data=data.cox noprint;
MPRINT(_ADJSURV): var group;
MPRINT(_ADJSURV): output out=maxout max(group)=numgroup;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set DATA.COX.
NOTE: The data set WORK.MAXOUT has 1 observations and 3 variables.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set maxout;
MPRINT(_ADJSURV): call symput('numgroup', numgroup);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
1072:162
NOTE: There were 1 observations read from the data set WORK.MAXOUT.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: Writing HTML Body file: sashtml.htm
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): read all var {sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after}
into x;
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): numcov=ncol(x);
MPRINT(_ADJSURV): create ncovout from numcov[colname='numcov'];
MPRINT(_ADJSURV): append from numcov;
MPRINT(_ADJSURV): close ncovout;
NOTE: The data set WORK.NCOVOUT has 1 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.57 seconds
cpu time 0.34 seconds
MPRINT(_ADJSURV): data _null_;
MPRINT(_ADJSURV): set ncovout;
MPRINT(_ADJSURV): call symput('numcov', numcov);
MPRINT(_ADJSURV): run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
2:197
NOTE: There were 1 observations read from the data set WORK.NCOVOUT.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use data.cox;
NOTE: Data file DATA.COX.DATA is in a format that is native to another host, or the file encoding
does not match the session encoding. Cross Environment Data Access will be used, which
might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): read all var {time} into time;
WARNING: Some character data was lost during transcoding in the dataset DATA.COX. Either the data
contains characters that are not representable in the new encoding or truncation
occurred during transcoding.
MPRINT(_ADJSURV): read all var {event} into event;
MPRINT(_ADJSURV): read all var {group} into group;
MPRINT(_ADJSURV): read all var {sex1 age1 comorbidities1 comorbidities2 comorbidities3
comorbidities4 comorbidities5 comorbidities6 concurrent1 concurrent2 concurrent previous after}
into x;
MPRINT(_ADJSURV): close data.cox;
MPRINT(_ADJSURV): out=time||event||group||x;
MPRINT(_ADJSURV): names={'time' 'event' 'strata' "z1" "z2" "z3" "z4" "z5" "z6" "z7" "z8" "z9"
"z10" "z11" "z12" "z13"};
MPRINT(_ADJSURV): create indata from out[colname=names];
MPRINT(_ADJSURV): append from out;
MPRINT(_ADJSURV): close indata;
NOTE: The data set WORK.INDATA has 979 observations and 16 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.08 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc sort data=indata;
MPRINT(_ADJSURV): by descending time descending event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.INDATA has 979 observations and 16 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): data alltime;
MPRINT(_ADJSURV): set indata (keep=time event);
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): drop event;
MPRINT(_ADJSURV): if first.time;
MPRINT(_ADJSURV): if event;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.INDATA.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=alltime;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: The data set WORK.ALLTIME has 166 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds
MPRINT(_ADJSURV): proc phreg data=indata covout outest=best noprint;
MPRINT(_ADJSURV): model time*event(0)= z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13;
MPRINT(_ADJSURV): strata strata;
MPRINT(_ADJSURV): output out=coxout xbeta=zb;
MPRINT(_ADJSURV): run;
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: The data set WORK.BEST has 14 observations and 18 variables.
NOTE: The data set WORK.COXOUT has 979 observations and 17 variables.
NOTE: PROCEDURE PHREG used (Total process time):
real time 0.12 seconds
cpu time 0.06 seconds
MPRINT(_ADJSURV): proc sort data=coxout;
MPRINT(_ADJSURV): by strata descending time;
MPRINT(_ADJSURV): run;
NOTE: There were 979 observations read from the data set WORK.COXOUT.
NOTE: The data set WORK.COXOUT has 979 observations and 17 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): data best sigma;
MPRINT(_ADJSURV): set best;
MPRINT(_ADJSURV): if _type_='PARMS' then output best;
MPRINT(_ADJSURV): else if _type_='COV' then output sigma;
MPRINT(_ADJSURV): run;
NOTE: There were 14 observations read from the data set WORK.BEST.
NOTE: The data set WORK.BEST has 1 observations and 18 variables.
NOTE: The data set WORK.SIGMA has 13 observations and 18 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data riskset1;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=1;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 98 observations read from the data set WORK.COXOUT.
WHERE strata=1;
NOTE: The data set WORK.RISKSET1 has 35 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=riskset1;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 35 observations read from the data set WORK.RISKSET1.
NOTE: The data set WORK.RISKSET1 has 35 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=1 & event=1;
MPRINT(_ADJSURV): table time/out=dcount1;
MPRINT(_ADJSURV): run;
NOTE: There were 41 observations read from the data set WORK.INDATA.
WHERE (strata=1) and (event=1);
NOTE: The data set WORK.DCOUNT1 has 34 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.08 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset1;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset1 dcount1 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 35 observations read from the data set WORK.RISKSET1.
NOTE: There were 34 observations read from the data set WORK.DCOUNT1.
NOTE: The data set WORK.RISKSET1 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv1 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv1;
NOTE: The data set WORK.SURV1 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.57 seconds
cpu time 0.54 seconds
MPRINT(_ADJSURV): data riskset2;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=2;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 148 observations read from the data set WORK.COXOUT.
WHERE strata=2;
NOTE: The data set WORK.RISKSET2 has 29 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=riskset2;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 29 observations read from the data set WORK.RISKSET2.
NOTE: The data set WORK.RISKSET2 has 29 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=2 & event=1;
MPRINT(_ADJSURV): table time/out=dcount2;
MPRINT(_ADJSURV): run;
NOTE: There were 37 observations read from the data set WORK.INDATA.
WHERE (strata=2) and (event=1);
NOTE: The data set WORK.DCOUNT2 has 28 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset2;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset2 dcount2 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 29 observations read from the data set WORK.RISKSET2.
NOTE: There were 28 observations read from the data set WORK.DCOUNT2.
NOTE: The data set WORK.RISKSET2 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv2 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv2;
NOTE: The data set WORK.SURV2 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.60 seconds
cpu time 0.59 seconds
MPRINT(_ADJSURV): data riskset3;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=3;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 86 observations read from the data set WORK.COXOUT.
WHERE strata=3;
NOTE: The data set WORK.RISKSET3 has 34 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=riskset3;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 34 observations read from the data set WORK.RISKSET3.
NOTE: The data set WORK.RISKSET3 has 34 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=3 & event=1;
MPRINT(_ADJSURV): table time/out=dcount3;
MPRINT(_ADJSURV): run;
NOTE: There were 38 observations read from the data set WORK.INDATA.
WHERE (strata=3) and (event=1);
NOTE: The data set WORK.DCOUNT3 has 33 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset3;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset3 dcount3 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 34 observations read from the data set WORK.RISKSET3.
NOTE: There were 33 observations read from the data set WORK.DCOUNT3.
NOTE: The data set WORK.RISKSET3 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv3 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv3;
NOTE: The data set WORK.SURV3 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.61 seconds
cpu time 0.59 seconds
MPRINT(_ADJSURV): data riskset4;
MPRINT(_ADJSURV): set coxout (keep=time strata z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13 zb);
MPRINT(_ADJSURV): where strata=4;
MPRINT(_ADJSURV): by descending time;
MPRINT(_ADJSURV): keep time s0 s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13;
MPRINT(_ADJSURV): s0+exp(zb);
MPRINT(_ADJSURV): s1_1+z1 * exp(zb);
MPRINT(_ADJSURV): s1_2+z2 * exp(zb);
MPRINT(_ADJSURV): s1_3+z3 * exp(zb);
MPRINT(_ADJSURV): s1_4+z4 * exp(zb);
MPRINT(_ADJSURV): s1_5+z5 * exp(zb);
MPRINT(_ADJSURV): s1_6+z6 * exp(zb);
MPRINT(_ADJSURV): s1_7+z7 * exp(zb);
MPRINT(_ADJSURV): s1_8+z8 * exp(zb);
MPRINT(_ADJSURV): s1_9+z9 * exp(zb);
MPRINT(_ADJSURV): s1_10+z10 * exp(zb);
MPRINT(_ADJSURV): s1_11+z11 * exp(zb);
MPRINT(_ADJSURV): s1_12+z12 * exp(zb);
MPRINT(_ADJSURV): s1_13+z13 * exp(zb);
MPRINT(_ADJSURV): if last.time;
MPRINT(_ADJSURV): run;
NOTE: There were 647 observations read from the data set WORK.COXOUT.
WHERE strata=4;
NOTE: The data set WORK.RISKSET4 has 128 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc sort data=riskset4;
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: There were 128 observations read from the data set WORK.RISKSET4.
NOTE: The data set WORK.RISKSET4 has 128 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): ODS LISTING CLOSE;
MPRINT(_ADJSURV): proc freq data=indata;
MPRINT(_ADJSURV): where strata=4 & event=1;
MPRINT(_ADJSURV): table time/out=dcount4;
MPRINT(_ADJSURV): run;
NOTE: There were 258 observations read from the data set WORK.INDATA.
WHERE (strata=4) and (event=1);
NOTE: The data set WORK.DCOUNT4 has 127 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.07 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): ODS LISTING;
MPRINT(_ADJSURV): data riskset4;
MPRINT(_ADJSURV): merge alltime (in=inall) riskset4 dcount4 (keep=time count);
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): drop ts:;
MPRINT(_ADJSURV): retain ts0 ts1_1 ts1_2 ts1_3 ts1_4 ts1_5 ts1_6 ts1_7 ts1_8 ts1_9 ts1_10
ts1_11 ts1_12 ts1_13 999;
MPRINT(_ADJSURV): if inall;
MPRINT(_ADJSURV): if count=. then count=0;
MPRINT(_ADJSURV): if s0^=. then ts0=s0;
MPRINT(_ADJSURV): else s0=ts0;
MPRINT(_ADJSURV): if s1_1^=. then ts1_1=s1_1;
MPRINT(_ADJSURV): else s1_1=ts1_1;
MPRINT(_ADJSURV): if s1_2^=. then ts1_2=s1_2;
MPRINT(_ADJSURV): else s1_2=ts1_2;
MPRINT(_ADJSURV): if s1_3^=. then ts1_3=s1_3;
MPRINT(_ADJSURV): else s1_3=ts1_3;
MPRINT(_ADJSURV): if s1_4^=. then ts1_4=s1_4;
MPRINT(_ADJSURV): else s1_4=ts1_4;
MPRINT(_ADJSURV): if s1_5^=. then ts1_5=s1_5;
MPRINT(_ADJSURV): else s1_5=ts1_5;
MPRINT(_ADJSURV): if s1_6^=. then ts1_6=s1_6;
MPRINT(_ADJSURV): else s1_6=ts1_6;
MPRINT(_ADJSURV): if s1_7^=. then ts1_7=s1_7;
MPRINT(_ADJSURV): else s1_7=ts1_7;
MPRINT(_ADJSURV): if s1_8^=. then ts1_8=s1_8;
MPRINT(_ADJSURV): else s1_8=ts1_8;
MPRINT(_ADJSURV): if s1_9^=. then ts1_9=s1_9;
MPRINT(_ADJSURV): else s1_9=ts1_9;
MPRINT(_ADJSURV): if s1_10^=. then ts1_10=s1_10;
MPRINT(_ADJSURV): else s1_10=ts1_10;
MPRINT(_ADJSURV): if s1_11^=. then ts1_11=s1_11;
MPRINT(_ADJSURV): else s1_11=ts1_11;
MPRINT(_ADJSURV): if s1_12^=. then ts1_12=s1_12;
MPRINT(_ADJSURV): else s1_12=ts1_12;
MPRINT(_ADJSURV): if s1_13^=. then ts1_13=s1_13;
MPRINT(_ADJSURV): else s1_13=ts1_13;
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.ALLTIME.
NOTE: There were 128 observations read from the data set WORK.RISKSET4.
NOTE: There were 127 observations read from the data set WORK.DCOUNT4.
NOTE: The data set WORK.RISKSET4 has 166 observations and 16 variables.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s0;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s1;
MPRINT(_ADJSURV): read all var{count} into count;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(s0);
MPRINT(_ADJSURV): numcov=ncol(s1);
MPRINT(_ADJSURV): cumuhaz=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp=0;
MPRINT(_ADJSURV): wtemp=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp=ctemp+count[i]/s0[i];
MPRINT(_ADJSURV): wtemp=wtemp+count[i]/s0[i]/s0[i];
MPRINT(_ADJSURV): cumuhaz[i]=ctemp;
MPRINT(_ADJSURV): w1[i]=wtemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): adjsurv=j(numtime,1,0);
MPRINT(_ADJSURV): varsurv=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz=j(numtime,1,0);
MPRINT(_ADJSURV): fh=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv=exp(-cumuhaz)##expbz;
MPRINT(_ADJSURV): adjsurv=adjsurv+surv;
MPRINT(_ADJSURV): fexpbz=fexpbz+surv#expbz;
MPRINT(_ADJSURV): h=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp=htemp + count[j]/s0[j]*(zmat[i,]-s1[j,]/s0[j]);
MPRINT(_ADJSURV): h[j,]=htemp;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh=fh+surv#h#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): adjsurv=adjsurv/numobs;
MPRINT(_ADJSURV): term1=(fexpbz##2)#w1;
MPRINT(_ADJSURV): term2=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term2[i]=fh[i,]*sigma*t(fh[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): varsurv=term1+term2;
MPRINT(_ADJSURV): varsurv=varsurv/numobs/numobs;
MPRINT(_ADJSURV): sesurv=varsurv##0.5;
MPRINT(_ADJSURV): outmat=time||adjsurv||sesurv;
MPRINT(_ADJSURV): names={'time' 'surv' 'se'};
MPRINT(_ADJSURV): create surv4 from outmat[colname=names];
MPRINT(_ADJSURV): append from outmat;
MPRINT(_ADJSURV): close surv4;
NOTE: The data set WORK.SURV4 has 166 observations and 3 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 0.58 seconds
cpu time 0.50 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov12 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov12;
NOTE: The data set WORK.COV12 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.08 seconds
cpu time 1.07 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov13 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov13;
NOTE: The data set WORK.COV13 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.08 seconds
cpu time 1.01 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset1;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset1;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov14 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov14;
NOTE: The data set WORK.COV14 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.24 seconds
cpu time 1.20 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov23 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov23;
NOTE: The data set WORK.COV23 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.16 seconds
cpu time 1.07 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset2;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset2;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov24 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov24;
NOTE: The data set WORK.COV24 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.15 seconds
cpu time 1.14 seconds
MPRINT(_ADJSURV): proc iml;
NOTE: IML Ready
MPRINT(_ADJSURV): use riskset3;
MPRINT(_ADJSURV): read all var{time} into time;
MPRINT(_ADJSURV): read all var{s0} into s01;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s11;
MPRINT(_ADJSURV): read all var{count} into count1;
MPRINT(_ADJSURV): close riskset3;
MPRINT(_ADJSURV): use riskset4;
MPRINT(_ADJSURV): read all var{s0} into s02;
MPRINT(_ADJSURV): read all var{ s1_1 s1_2 s1_3 s1_4 s1_5 s1_6 s1_7 s1_8 s1_9 s1_10 s1_11 s1_12
s1_13} into s12;
MPRINT(_ADJSURV): read all var{count} into count2;
MPRINT(_ADJSURV): close riskset4;
MPRINT(_ADJSURV): use best;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into b;
MPRINT(_ADJSURV): close best;
MPRINT(_ADJSURV): use sigma;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into sigma;
MPRINT(_ADJSURV): close sigma;
MPRINT(_ADJSURV): use indata;
MPRINT(_ADJSURV): read all var{ z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 z11 z12 z13} into zmat;
MPRINT(_ADJSURV): close indata;
MPRINT(_ADJSURV): numtime=nrow(time);
MPRINT(_ADJSURV): numobs=nrow(zmat);
MPRINT(_ADJSURV): numcov=ncol(s11);
MPRINT(_ADJSURV): cumuhaz1=j(numtime,1,0);
MPRINT(_ADJSURV): cumuhaz2=j(numtime,1,0);
MPRINT(_ADJSURV): w1=j(numtime,1,0);
MPRINT(_ADJSURV): w2=j(numtime,1,0);
MPRINT(_ADJSURV): ctemp1=0;
MPRINT(_ADJSURV): ctemp2=0;
MPRINT(_ADJSURV): wtemp1=0;
MPRINT(_ADJSURV): wtemp2=0;
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): ctemp1=ctemp1+count1[i]/s01[i];
MPRINT(_ADJSURV): ctemp2=ctemp2+count2[i]/s02[i];
MPRINT(_ADJSURV): wtemp1=wtemp1+count1[i]/s01[i]/s01[i];
MPRINT(_ADJSURV): wtemp2=wtemp2+count2[i]/s02[i]/s02[i];
MPRINT(_ADJSURV): cumuhaz1[i]=ctemp1;
MPRINT(_ADJSURV): cumuhaz2[i]=ctemp2;
MPRINT(_ADJSURV): w1[i]=wtemp1;
MPRINT(_ADJSURV): w2[i]=wtemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fexpbz1=j(numtime,1,0);
MPRINT(_ADJSURV): fexpbz2=j(numtime,1,0);
MPRINT(_ADJSURV): fh2_fh1=j(numtime,numcov,0);
MPRINT(_ADJSURV): do i=1 to numobs;
MPRINT(_ADJSURV): expbz=exp(zmat[i,]*t(b));
MPRINT(_ADJSURV): surv1=exp(-cumuhaz1)##expbz;
MPRINT(_ADJSURV): surv2=exp(-cumuhaz2)##expbz;
MPRINT(_ADJSURV): fexpbz1=fexpbz1+surv1#expbz;
MPRINT(_ADJSURV): fexpbz2=fexpbz2+surv2#expbz;
MPRINT(_ADJSURV): h1=j(numtime,numcov,0);
MPRINT(_ADJSURV): h2=j(numtime,numcov,0);
MPRINT(_ADJSURV): htemp1=j(1, numcov, 0);
MPRINT(_ADJSURV): htemp2=j(1, numcov, 0);
MPRINT(_ADJSURV): do j=1 to numtime;
MPRINT(_ADJSURV): htemp1=htemp1 + count1[j]/s01[j]*(zmat[i,]-s11[j,]/s01[j]);
MPRINT(_ADJSURV): htemp2=htemp2 + count2[j]/s02[j]*(zmat[i,]-s12[j,]/s02[j]);
MPRINT(_ADJSURV): h1[j,]=htemp1;
MPRINT(_ADJSURV): h2[j,]=htemp2;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): fh2_fh1=fh2_fh1+surv2#h2#expbz-surv1#h1#expbz;
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): term1=(fexpbz1##2)#w1;
MPRINT(_ADJSURV): term2=(fexpbz2##2)#w2;
MPRINT(_ADJSURV): term3=j(numtime,1,0);
MPRINT(_ADJSURV): do i=1 to numtime;
MPRINT(_ADJSURV): term3[i]=fh2_fh1[i,]*sigma*t(fh2_fh1[i,]);
MPRINT(_ADJSURV): end;
MPRINT(_ADJSURV): covar=term1+term2+term3;
MPRINT(_ADJSURV): covar=covar/numobs/numobs;
MPRINT(_ADJSURV): cov=covar##0.5;
MPRINT(_ADJSURV): names={'se'};
MPRINT(_ADJSURV): create cov34 from cov[colname=names];
MPRINT(_ADJSURV): append from cov;
MPRINT(_ADJSURV): close cov34;
NOTE: The data set WORK.COV34 has 166 observations and 1 variables.
MPRINT(_ADJSURV): run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
MPRINT(_ADJSURV): quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 1.09 seconds
cpu time 1.04 seconds
MPRINT(_ADJSURV): data mout;
MPRINT(_ADJSURV): merge surv1 (rename=(surv=surv1 se=se1)) surv2 (rename=(surv=surv2 se=se2))
surv3 (rename=(surv=surv3 se=se3)) surv4 (rename=(surv=surv4 se=se4)) cov12 (rename=(se=se12))
cov13 (rename=(se=se13)) cov14 (rename=(se=se14)) cov23 (rename=(se=se23)) cov24
(rename=(se=se24)) cov34 (rename=(se=se34));
MPRINT(_ADJSURV): run;
NOTE: There were 166 observations read from the data set WORK.SURV1.
NOTE: There were 166 observations read from the data set WORK.SURV2.
NOTE: There were 166 observations read from the data set WORK.SURV3.
NOTE: There were 166 observations read from the data set WORK.SURV4.
NOTE: There were 166 observations read from the data set WORK.COV12.
NOTE: There were 166 observations read from the data set WORK.COV13.
NOTE: There were 166 observations read from the data set WORK.COV14.
NOTE: There were 166 observations read from the data set WORK.COV23.
NOTE: There were 166 observations read from the data set WORK.COV24.
NOTE: There were 166 observations read from the data set WORK.COV34.
NOTE: The data set WORK.MOUT has 166 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data data.coxout;
MPRINT(_ADJSURV): time=0;
MPRINT(_ADJSURV): surv1=1;
MPRINT(_ADJSURV): se1=0;
MPRINT(_ADJSURV): se12=0;
MPRINT(_ADJSURV): se13=0;
MPRINT(_ADJSURV): se14=0;
MPRINT(_ADJSURV): surv2=1;
MPRINT(_ADJSURV): se2=0;
MPRINT(_ADJSURV): se23=0;
MPRINT(_ADJSURV): se24=0;
MPRINT(_ADJSURV): surv3=1;
MPRINT(_ADJSURV): se3=0;
MPRINT(_ADJSURV): se34=0;
MPRINT(_ADJSURV): surv4=1;
MPRINT(_ADJSURV): se4=0;
MPRINT(_ADJSURV): output;
MPRINT(_ADJSURV): run;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
NOTE: The data set DATA.COXOUT has 1 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(_ADJSURV): data data.coxout;
MPRINT(_ADJSURV): set data.coxout mout;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
MPRINT(_ADJSURV): by time;
MPRINT(_ADJSURV): run;
NOTE: Data file DATA.COXOUT.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
NOTE: There were 1 observations read from the data set DATA.COXOUT.
NOTE: There were 166 observations read from the data set WORK.MOUT.
NOTE: The data set DATA.COXOUT has 167 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
Thank you for your help!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.