************************************************************ * Program: C:\NHANES\CleanRecode_CheckMissing.sas * * Proposal: Check extent of missing data * ************************************************************; libname NH "C:\your_dir"; /*change the name of the directory folder to the location that you saved your downloaded dataset from the sample code and dataset downloads module: for example "c:\nhanes\data"*/ /*Check the extent of missing data*/ Proc means data=NH.demo_BP N Nmiss min max; where ridstatr=2 and ridageyr>=20; * interviewed and examined(ridstatr=2), adults age 20+; var BPQ010--BPQ100d MCQ160b--MCQ160f; *blood pressure variables; Title "Check missing, min, max values for numeric variables"; Proc freq data=NH.demo_BP; where ridstatr=2 and ridageyr>=20; table BPQ010--BPQ100d MCQ160b--MCQ160f/list missing; title 'Check frequency distribution for categorical variables'; run;