Monday, December 18, 2006

Directing SAS output to a pdf file

ods pdf file= "/usr2/users/student/mkaushik/bio213/testd.pdf";
*** would direct all the output to testd.pdf file*

*ods pdf file ="%sysfunc
(reverse(%sysfunc(substr(%sysfunc(reverse(%sysfunc(reverse(%scan(%sysfunc(reverse(%sysfunc(getoption(sysin)))),1,/))))),5)))).pdf";
goptions reset=global device=gif ftitle=swissb ftext=swissb htitle=2 htext=2;


data weights;
infile '/usr2/users/student/mkaushik/ne/lbw1';
****change the above line to reflect where you have saved lbw.dat**;

input id low age lwt race smoke ptl ht ui ftv bwt;
run;

proc means;
var age lwt bwt;
run;

proc univariate plot;
var age lwt bwt;
run;

proc gplot;
plot bwt*lwt;
proc corr pearson spearman;
var bwt lwt;

proc gplot data =results;
plot bwt*lwt= '.' pred1*lwt='*' lowerm*lwt='L' upperm*lwt='U'/ overlay;
run;

quit;
ods pdf close;

No comments: