************************************************************************ * Program: C:\NHANES\.sas * * Proposal: * ************************************************************************; LIBNAME NH "C:\NHANES\DATA"; OPTIONS NODATE NOCENTER; options ls=72; proc format; VALUE sexfmt 1 = 'Male' 2 = 'Female' ; VALUE racefmt 1 = 'NH White' 2 = 'NH Black' 3 = 'Mexican American' 4 = 'Other' ; VALUE agefmt 1 = '20-39' 2 = '40-59' 3 = '60+' ; run; data ANALYSIS_DATA; set NH.ANALYSIS_DATA; if ridstatr = 2; ***examined ; age = .; if 20 LE ridageyr LE 39 then age=1; if 40 LE ridageyr LE 59 then age=2; if ridageyr GE 60 then age=3; race=.; if ridreth1=3 then race=1; if ridreth1=4 then race=2; if ridreth1=1 then race=3; if ridreth1=2 or ridreth1=5 then race=4; LABEL age = 'AGE GROUP' race = 'Race Ethnicity' riagendr = 'Gender' ; RUN; proc sort; by riagendr age; run; PROC SORT DATA=analysis_Data; BY sdmvstra sdmvpsu ; RUN; proc descript data=analysis_Data geometric design=wr; subpopn ridageyr >=20 ; NEST sdmvstra sdmvpsu; weight wtmec4yr; subgroup riagendr age ; levels 2 3 ; var lbxtc; table riagendr * age; PRINT nsum="Sample Size" geomean="Geometric Mean" segeomean="Standard Error" / nohead notime style=nchs nsumfmt=F7.0 geomeanfmt=F9.2 segeomeanfmt=F9.3; RFORMAT age AGEFMT.; RFORMAT riagendr SEXFMT.; RFORMAT race RACEFMT. ; rtitle "Geometric means of total cholesterol and standard errors by sex and age: NHANES 1999-2002"; run;