************************************************************************ * 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 UNIVARIATE NOPRINT; where ridageyr >= 20; by riagendr age; VAR lbxtc; freq wtmec4yr; FORMAT age AGEFMT. riagendr SEXFMT. race RACEFMT. ; output out=sasdataset mean=mean q1=p_25 median=median q3=p_75; proc print data=sasdataset; title "Distribution of cholesterol: NHANES 1999-2002"; run;