13.07.2015 Views

Leiby - NESUG

Leiby - NESUG

Leiby - NESUG

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

•=•=•=•=VAR = A list of the continuous variables to be analyzedGROUP = The variable that identifies the group to which anobservation belongs. This is the class variable for the t-testor ANOVA. Only one variable can be specified.BY = The variable used to stratify the analysis. Only one byvariable can be specified. For readability of the output, a byvariable should have no more than four levels.GRAPHS = HISTOGRAM | BOXPLOT | QQPLOT | NONEThe macro allows the user to choose which plots will appearin the output. The user may choose up to 2 of the three plottypes. If more than two are specified, only the first two willbe used. Specify NONE to exclude the graphical output. Bydefault, the macro produces histograms and box plots.•= VARPAGE = 1 | 2This is the number of variables to put on a page of output. IfVARPAGE=1, one variable's output is placed on an entirepage. If VARPAGE=2, each variable's output is placed onhalf of the page. By default, the macro puts output for onevariable on each page.•=MAXDEC = The maximum number of decimal places for thedescriptive statistics. The default value is 3.(Washington County, Maryland; Forsyth County, North Carolina;and selected suburbs of Minneapolis, Minnesota). The fourthpart of the cohort was sampled from black residents of Jackson,Mississippi. Demographic information including race, age, sex,alcohol use, smoking status, and education level was collected.Subjects underwent a medical examination at the beginning ofthe study and one every three years thereafter to determine thepresence of cardiopulmonary diseases including coronary heartdisease and to record relevant health information including bodymass index (BMI), blood pressure and presence ofhypertension, diabetes, and cholesterol level.ANALYSISAs a first step, we might want to check our randomization andsee if the distribution of age is similar across the fourcommunities. To use the macro, we would choose age as ourresponse variable and center as our group variable. Thefollowing macro call asks for an analysis of age by center.%describe(data=chd,var=age, group=center,graphs=boxplot qqplot, varpage=1, maxdec=1,device=pdf, gfile=example1.pdf,rotate=portrait);The output can be seen in Figure 5.•=•=•=•=•=DEVICE = The graphics device used to produce the finaloutput. By default, the current graphics device (as specifiedwith a GOPTIONS statement) is used. If no graphics devicehas been specified, the macro will use the device PS1200 (apostscript driver).GFILE = The graphics file where the output will be stored.By default, the current graphics output file (specified with theGSFNAME option in the GOPTIONS statement) is used.DENSITY= KERNEL | NORMAL | BOTH | NONESpecify which density estimate curves to plot on thehistograms. By default, the macro will produce both kerneldensity estimates and a normal density curve. The kerneldensity estimate is based on the normal distribution.REPLACE= REPLACE | APPENDSpecifies whether to replace the specified graphics file withthe pages produced by the current macro call or to appendthose pages to the graphics file. This is especially usefulwhen calling the macro more than once in a program. Bydefault, the macro will replace the specified graphics file.ROTATE= PORTRAIT | LANDSCAPESpecifies the orientation of the final plot. By default, themacro uses portrait orientation.Another concern might be possible differences between thosewith coronary heart disease and those without disease withrespect to the continuous risk factors, controlling for center. Themacro call would be:%describe(data=chd, var=age bmi cholesterolglucose dbp sbp, group=chd, by=center,graphs=histogram boxplot, varpage=1, maxdec=3,device=pdf, gfile=example2.pdf,rotate=landscape);This macro call will generate six pages of output, one for eachvariable specified in the var= parameter. Pages 2 and 4 of theoutput are found in Figures 6 and 7. Notice the difference inoutput layout with the landscape orientation.ADDITIONAL INFORMATION:In order to accommodate PROC GPRINT, the macro writes thestatistical output to two text files. This macro was written for useon a Unix platform and includes commands to delete the filesafter they are used. If used on a different platform, these linesshould be commented out:x rm –f tests.txt;x rm –f stats.txt;EXAMPLEDATA DESCRIPTIONThe data set used in these examples is a random sample fromthe Atherosclerosis Risk in Communities (ARIC) study cohort.The ARIC study, sponsored by the National Heart, Lung, andBlood Institute, is a community-based, longitudinal study ofcardiovascular and pulmonary diseases. The ARIC cohort wasselected as a probability sample of 15,792 men and womenbetween the ages of 45-64 year at four study centers in theUnited States, three of which enumerated and enrolled all ageeligibleresidents sampled from geographically defined areasWhile the macro will work for most types of graphics devicedrivers, it was designed with postscript and PDF drivers in mind.When using a Windows-related driver like CGM, only oneanalysis variable should be specified in the VAR= option. Usingweb-related drivers will often produce undesirable results,especially when using group and by variables with more than 3levels. The size of the print becomes too small to be seen withthe coarser resolutions of most web-related drivers.The macro calls two graphics macros (%SIZEIT and%TMPLTMAC to replay the box plots. These macros areaccessed using the SASAUTOS and MAUTOSOURCE options.The SASAUTOS option needs to be changed depending on thelocation of the macros and the platform on which the program isrun.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!