/*==================================================================== Program Name : NU_021_table01.sas Path : Program Language : SAS V9.4 Purpose : create one table Operating System : Windows 7 professional 64bit Date created : 20160613 ___________________________________________________________________________ Purpose : Run Dependencies : NU_008_twinCorrelation_CronbachCoefficientAlpha.sas Macro Calls External : Internal : Files Input : out.corr_simplestats_append Output : Program Flow : Date Update 20160613 modified from Olsaa_dataList_03a_table01_IE.sas ____________________________________________________________________________*/ /*delete all datasets in the work library*/ /*proc datasets lib=work kill memtype=data NOLIST; run; quit;*/ /*---------------------------------------------------------------import data into SAS-------------------------------------------------------*/ data out.NU_table_01; set out.corr_simplestats_append; gap01=''; /*add gap01, gap02 for inserting blank in PROC REPORT*/ gap02=''; TT=1; /*insert this variable for breaking pages*/ run; /*------------------------------------------------Add titles and footnotes--------------------------------------------------------------------*/ proc sort data= out.NU_table_01; by TT; run; /*change a procedure label*/ ods proclabel="&NU_corr_simpleStats." ; /*first node kept and used in table of contents*/ title4 J=L /*this is the table title*/ font='Times New Roman' h=10pt "&NU_corr_simpleStats." ; footnote j=l /*this is the footnote*/ font='Times New Roman' h=10pt "Program Name: &program_name. Programmer: Chang Date:%sysfunc(date(),worddate18.)" ; /*-----------------------------------------------------------add table body-----------------------------------------------------------*/ /*references URL ------------------------------------------------------------------------------------------------------------------------------ remove nodes http://support.sas.com/kb/31/278.html col header border http://www.phusewiki.org/docs/2006/CC03.pdf COMPUTE AFTER _PAGE http://support.sas.com/rnd/papers/sgf07/sgf2007-report.pdf ----------------------------------------------------------------------------------------------------------------------------*/ proc report data=out.NU_table_01 contents="" /*remove default 2nd node*/ nowd split='|' style(report)={width=100% cellpadding=8px font_face='Times New Roman' font_size=10pt background = TRANSPARENT} style(header)={just=left font_weight=bold font_face='Times New Roman' font_size=10pt font_style=roman protectspecialchars = OFF background = TRANSPARENT} style(column)={font_face='Times New Roman' font_size=10pt background = TRANSPARENT} ; /*The COLUMN statement is used to list each report column*/ column ZYGOSITY_a Variable Individuals Mean StdDev ; /*TT */ /*Each column, in turn, has a DEFINE statement that describes how that column is created and formatted.*/ /*define TT / noprint order;*/ %def_display( cVar=ZYGOSITY_a ,cName=Zygosity ,isFmt=N ,cFmt= ,cWide=25pt); %def_display( cVar=Variable ,cName=Variable ,isFmt=N ,cFmt= ,cWide=25pt); %def_display( cVar=Individuals ,cName= Individuals ,isFmt=N ,cFmt= ,cWide=25pt); %def_display( cVar=Mean ,cName= Mean ,isFmt=N ,cFmt= ,cWide=25pt); %def_display( cVar=StdDev ,cName= SD ,isFmt=N ,cFmt= ,cWide=25pt); /*define all the gap variables*/ /*%def_display( cVar=gap01 ,cName= ,isFmt=N ,cFmt= ,cWide=0.2%);*/ compute after _page_ /style={just=l font_size=10pt font_face='Times New Roman' borderbottomcolor=white bordertopcolor=black}; line 'MZ: Monozygotic twins; DZ: Dizygotic twins'; /*this inserts table footnotes at the last page*/ endcomp; /*break before TT/ page contents="";*/ /*remove 3rd node*/ run; /*----------------------------------------------------This is the end of this program-----------------------------------------------------------------*/