/*toothloss.sas*/ /*June 2, 2005*/ /*Program to recreate estimates for NHANES 1999-2002 MMWR*/ /*Prevalence of tooth loss and mean number of teeth among adults 20 and older*/ /*Reads NH4MMWR and NH3MMWR*/ /*Variables used in this section */ /* SEQN Respondent sequence number ASDIST4B Age Dist 4b ages 20 and older - 3 age groups 20-39, 40-59, 60+ ASDIST4Da Age Dist 4d ages 20 and older - age and sex, by 10-year age groups ASDIST4F Age Dist 4f 20+ - age, 5 year age groups overall ASDIST4Fa Age Dist 4fa 20+ - age, 10 year age groups overall RIDAGEYR Age in Years RIAGENDR Gender RIDRETH2 Race/Ethnicity PIRGRP3 Poverty in 3 groups DMDEDUX Education (individual's education not head of household) smokecfnX Smoking status (current, former, never) WTMEC4YR Weights for 1999-2002 MEC examined SDDSRVYR Survey cycle SDMVSTRA Strata SDMVPSU PSU edentate28P Edentate based on 28 permanent teeth exclusive of 3rd molars OHDNPRMa Number of permanent teeth present - tc - 28 tooth spaces OHDPRMa Any permanent teeth present - tc - 28 tooth spaces */ /*temporary formats*/ proc format; value sex 1="Male" 2="Female" ; value phase 1="1999-2000" 2="2001-2002" ; value age 1="20-39yr" 2="40-59yr" 3="60+ yr" ; value age5yr 1="20-24" 2="25-29" 3="30-34" 4="35-39" 5="40-44" 6="45-49" 7="50-54" 8="55-59" 9="60-64" 10="65-69" 11="70-74" 12="75-79" 13="80-84" 14="85+" ; value race 1="NH White" 2="NH Black" 3="Mexican American" 4="Other/including Multi-racial" 5="Other Hispanic" ; value pir 1="<100" 2="100-199" 3="200+" ; value yesno 1="yes" 2="No" ; value edu 1="=20 ; subgroup RIDRETH2 ASDIST4B RIAGENDR PIRGRP3 DMDEDUX smokecfnX ; level 5 3 2 3 3 3; tables ASDIST4B RIAGENDR RIDRETH2 PIRGRP3 DMDEDUX smokecfnX ASDIST4B*RIAGENDR ASDIST4B*RIDRETH2 ASDIST4B*PIRGRP3 ASDIST4B*DMDEDUX ASDIST4B*smokecfnX; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total percent sepercent / style =nchs totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f6.2 ; output nsum wsum total percent sepercent / filename=NHANESAB.N4G1u REPLACE filetype=SAS totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f5.2 ; rtitle "G1. N IV phase I + II not age/sex adjusted (10 yr) Percent edentate (28 teeth excluding 3rd molars) (N4G1u)"; run; data NHANESAB.N4G1u; set NHANESAB.N4G1u; format tablename $8.; tablename="N4G1u "; run; proc descript data=NHANESAB.nh4mmwr design=wr;/*G1. Percent edentulous (28 teeth excluding 3rd molars) - age adjusted*/ weight WTMEC4YR; nest SDMVSTRA SDMVPSU /strlev=1 psulev=2 missunit; var edentate28P ; catlevel 1 ; subpopn ridageyr >=20; subgroup ASDIST4Fa RIDRETH2 ASDIST4B RIAGENDR ; level 7 5 3 2 ; tables RIAGENDR ASDIST4B*RIAGENDR; Stdvar ASDIST4Fa; Stdwgt 0.185201 0.214603 0.217661 0.157158 0.103279 0.083085 0.039013; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total percent sepercent / style =nchs totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f6.2 ; output nsum wsum total percent sepercent / filename=NHANESAB.N4G1aa REPLACE filetype=SAS totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f5.2 ; rtitle "G1. N IV phase I + II age adjusted (10 yr) Percent edentate (28 teeth excluding 3rd molars) (N4G1aa)"; run; data NHANESAB.N4G1aa; set NHANESAB.N4G1aa; format tablename $8.; tablename="N4G1aa "; run; proc descript data=NHANESAB.nh4mmwr design=wr;/*G1. Percent edentate(28 teeth excluding 3rd molars) - age/sex adjusted*/ weight WTMEC4YR; nest SDMVSTRA SDMVPSU /strlev=1 psulev=2 missunit; var edentate28P ; catlevel 1 ; subpopn ridageyr >=20; subgroup ASDIST4B ASDIST4Da RIDRETH2 RIAGENDR PIRGRP3 DMDEDUX smokecfnX; level 3 14 5 2 3 3 3; tables ASDIST4B RIDRETH2 PIRGRP3 DMDEDUX smokecfnX ASDIST4B*RIDRETH2 ASDIST4B*PIRGRP3 ASDIST4B*DMDEDUX ASDIST4B*smokecfnX; Stdvar ASDIST4Da; Stdwgt 0.093163 0.092036 0.106732 0.107875 0.107360 0.110298 0.076017 0.081144 0.048185 0.055093 0.035780 0.047305 0.013877 0.025135 ; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total percent sepercent / style =nchs totalfmt=f13.1 percentfmt=f6.2 sepercentfmt=f6.2 wsumfmt=f15.1; output nsum wsum total percent sepercent / filename=NHANESAB.N4G1asa REPLACE filetype=SAS totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f5.2 ; rtitle "G1. N IV phase I + II age/sex adjusted (10 yr) Percent edentate (28 teeth excluding 3rd molars) (N4G1asa)"; run; data NHANESAB.N4G1asa; set NHANESAB.N4G1asa; format tablename $8.; tablename="N4G1asa "; run; /*Figure G3. Mean number of permanent teeth among dentate adults aged 20 years and older, by selected characteristics -- United States, 1988-1994 and 1999-2002*/ proc descript data=NHANESAB.nh4mmwr design=wr;/*G3. Mean number of permanent teeth (based on 28) - not age adjusted*/ weight WTMEC4YR; nest SDMVSTRA SDMVPSU/strlev=1 psulev=2 missunit; var OHDNPRMa ; subpopn ridageyr >=20 and OHDPRMa=1; subgroup RIDRETH2 ASDIST4B RIAGENDR PIRGRP3 DMDEDUX smokecfnX ; level 5 3 2 3 3 3; tables ASDIST4B RIAGENDR RIDRETH2 PIRGRP3 DMDEDUX smokecfnX ASDIST4B*RIAGENDR ASDIST4B*RIDRETH2 ASDIST4B*PIRGRP3 ASDIST4B*DMDEDUX ASDIST4B*smokecfnX; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total mean semean / style =nchs totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; output nsum wsum total mean semean / filename=NHANESAB.N4G3u REPLACE filetype=SAS totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; rtitle "G3. N IV phase I + II not age/sex adjusted (10 yr) Mean number of permanent teeth (based on 28) among dentate (N4G3u)"; run; data NHANESAB.N4G3u; set NHANESAB.N4G3u; format tablename $8.; tablename="N4G3u "; run; proc descript data=NHANESAB.nh4mmwr design=wr;/*G3. Mean number of permanent teeth (based on 28) - age adjusted*/ weight WTMEC4YR; nest SDMVSTRA SDMVPSU /strlev=1 psulev=2 missunit; var OHDNPRMa ; subpopn ridageyr >=20 and OHDPRMa=1; subgroup ASDIST4Fa RIDRETH2 ASDIST4B RIAGENDR ; level 7 5 3 2 ; tables RIAGENDR ASDIST4B*RIAGENDR; Stdvar ASDIST4Fa; Stdwgt 0.185201 0.214603 0.217661 0.157158 0.103279 0.083085 0.039013; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total mean semean / style =nchs totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; output nsum wsum total mean semean / filename=NHANESAB.N4G3aa REPLACE filetype=SAS totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; rtitle "G3. N IV phase I + II age adjusted (10 yr) Mean number of permanent teeth (based on 28) among dentate (N4G3aa)"; run; data NHANESAB.N4G3aa; set NHANESAB.N4G3aa; format tablename $8.; tablename="N4G3aa "; run; proc descript data=NHANESAB.nh4mmwr design=wr;/*G3. Mean number of permanent teeth (based on 28) - age/sex adjusted*/ weight WTMEC4YR; nest SDMVSTRA SDMVPSU /strlev=1 psulev=2 missunit; var OHDNPRMa ; subpopn ridageyr >=20 and OHDPRMa=1; subgroup ASDIST4B ASDIST4Da RIDRETH2 RIAGENDR PIRGRP3 DMDEDUX smokecfnX; level 3 14 5 2 3 3 3; tables ASDIST4B RIDRETH2 PIRGRP3 DMDEDUX smokecfnX ASDIST4B*RIDRETH2 ASDIST4B*PIRGRP3 ASDIST4B*DMDEDUX ASDIST4B*smokecfnX; Stdvar ASDIST4Da; Stdwgt 0.093163 0.092036 0.106732 0.107875 0.107360 0.110298 0.076017 0.081144 0.048185 0.055093 0.035780 0.047305 0.013877 0.025135 ; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total mean semean / style =nchs totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; output nsum wsum total mean semean / filename=NHANESAB.N4G3asa REPLACE filetype=SAS totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; rtitle "G3. N IV phase I + II age/sex adjusted (10 yr) Mean number of permanent teeth (based on 28) among dentate (N4G3asa)"; run; data NHANESAB.N4G3asa; set NHANESAB.N4G3asa; format tablename $8.; tablename="N4G3asa"; run; /*Compile estimates into one data set for export to MSExcel file (.xls)*/ data NHANESAB.N4ToothLoss; set NHANESAB.N4G1u NHANESAB.N4G1aa NHANESAB.N4G1asa NHANESAB.N4G3u NHANESAB.N4G3aa NHANESAB.N4G3asa ; if percent>0 then do; RSE=sepercent/percent; /*Relative Standard Error*/ end; if mean>0 then do; RSE=semean/mean; /*Relative Standard Error*/ end; if ASDIST4B>=0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if ASDIST4B=0 then Category="Total Age "; else if ASDIST4B=1 then Category="Age 20-39 "; else if ASDIST4B=2 then Category="Age 40-59 "; else if ASDIST4B=3 then Category="Age 60+ "; end; else if ASDIST4B<0 and RIDRETH2>=0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if RIDRETH2=0 then Category="Total Race/Ethn "; else if RIDRETH2=1 then Category="NH White "; else if RIDRETH2=2 then Category="NH Black "; else if RIDRETH2=3 then Category="Mexican American "; else if RIDRETH2=4 then Category="Other/MultiRace "; else if RIDRETH2=5 then Category="Other Hispanic "; end; else if ASDIST4B<0 and RIDRETH2<0 and RIAGENDR>=0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if RIAGENDR=0 then Category="Total Gender "; else if RIAGENDR=1 then Category="Male "; else if RIAGENDR=2 then Category="Female "; end; else if ASDIST4B<0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3>=0 and DMDEDUX<0 and SMOKECFNX<0 then do; if PIRGRP3=0 then Category="Total PIR "; else if PIRGRP3=1 then Category="<100 "; else if PIRGRP3=2 then Category="100-199 "; else if PIRGRP3=3 then Category=">=200 "; end; else if ASDIST4B<0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX>=0 and SMOKECFNX<0 then do; if DMDEDUx=0 then Category="Total Education "; else if DMDEDUx=1 then Category="=0 then do; if SMOKECFNx=0 then Category="Total Smoking "; else if SMOKECFNx=1 then Category="Current "; else if SMOKECFNx=2 then Category="Former "; else if SMOKECFNx=3 then Category="Never "; end; else if ASDIST4B>=0 and RIDRETH2>=0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if ASDIST4B=0 and RIDRETH2=0 then Category="Total Age by RaceEthn "; else if ASDIST4B=0 and RIDRETH2=1 then Category="Total Age - NH White "; else if ASDIST4B=0 and RIDRETH2=2 then Category="Total Age - NH Black "; else if ASDIST4B=0 and RIDRETH2=3 then Category="Total Age - Mex Am "; else if ASDIST4B=0 and RIDRETH2=4 then Category="Total Age - Other "; else if ASDIST4B=0 and RIDRETH2=5 then Category="Total Age - Other Hisp "; else if ASDIST4B=1 and RIDRETH2=0 then Category="Age 20-39 All RaceEthn "; else if ASDIST4B=1 and RIDRETH2=1 then Category="Age 20-39 - NH White "; else if ASDIST4B=1 and RIDRETH2=2 then Category="Age 20-39 - NH Black "; else if ASDIST4B=1 and RIDRETH2=3 then Category="Age 20-39 - Mex Am "; else if ASDIST4B=1 and RIDRETH2=4 then Category="Age 20-39 - Other "; else if ASDIST4B=1 and RIDRETH2=5 then Category="Age 20-39 - Other Hisp "; else if ASDIST4B=2 and RIDRETH2=0 then Category="Age 40-59 All RaceEthn "; else if ASDIST4B=2 and RIDRETH2=1 then Category="Age 40-59 - NH White "; else if ASDIST4B=2 and RIDRETH2=2 then Category="Age 40-59 - NH Black "; else if ASDIST4B=2 and RIDRETH2=3 then Category="Age 40-59 - Mex Am "; else if ASDIST4B=2 and RIDRETH2=4 then Category="Age 40-59 - Other "; else if ASDIST4B=2 and RIDRETH2=5 then Category="Age 40-59 - Other Hisp "; else if ASDIST4B=3 and RIDRETH2=0 then Category="Age 60+ All RaceEthn "; else if ASDIST4B=3 and RIDRETH2=1 then Category="Age 60+ - NH White "; else if ASDIST4B=3 and RIDRETH2=2 then Category="Age 60+ - NH Black "; else if ASDIST4B=3 and RIDRETH2=3 then Category="Age 60+ - Mex Am "; else if ASDIST4B=3 and RIDRETH2=4 then Category="Age 60+ - Other "; else if ASDIST4B=3 and RIDRETH2=5 then Category="Age 60+ - Other Hisp "; end; else if ASDIST4B>=0 and RIDRETH2<0 and RIAGENDR>=0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if ASDIST4B=0 and RIAGENDR=0 then Category="Total Age by Gender "; else if ASDIST4B=0 and RIAGENDR=1 then Category="Total Age - Male "; else if ASDIST4B=0 and RIAGENDR=2 then Category="Total Age - Female "; else if ASDIST4B=1 and RIAGENDR=0 then Category="Age 20-39 Both Genders "; else if ASDIST4B=1 and RIAGENDR=1 then Category="Age 20-39 - Male "; else if ASDIST4B=1 and RIAGENDR=2 then Category="Age 20-39 - Female "; else if ASDIST4B=2 and RIAGENDR=0 then Category="Age 40-59 Both Genders "; else if ASDIST4B=2 and RIAGENDR=1 then Category="Age 40-59 - Male "; else if ASDIST4B=2 and RIAGENDR=2 then Category="Age 40-59 - Female "; else if ASDIST4B=3 and RIAGENDR=0 then Category="Age 60+ Both Genders "; else if ASDIST4B=3 and RIAGENDR=1 then Category="Age 60+ - Male "; else if ASDIST4B=3 and RIAGENDR=2 then Category="Age 60+ - Female "; end; else if ASDIST4B>=0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3>=0 and DMDEDUX<0 and SMOKECFNX<0 then do; if ASDIST4B=0 and PIRGRP3=0 then Category="Total Age by PIR "; else if ASDIST4B=0 and PIRGRP3=1 then Category="Total Age - < 100 "; else if ASDIST4B=0 and PIRGRP3=2 then Category="Total Age - 100 to 199 "; else if ASDIST4B=0 and PIRGRP3=3 then Category="Total Age - 200 or more "; else if ASDIST4B=1 and PIRGRP3=0 then Category="Age 20-39 All PIR groups "; else if ASDIST4B=1 and PIRGRP3=1 then Category="Age 20-39 - < 100 "; else if ASDIST4B=1 and PIRGRP3=2 then Category="Age 20-39 - 100 to 199 "; else if ASDIST4B=1 and PIRGRP3=3 then Category="Age 20-39 - 200 or more "; else if ASDIST4B=2 and PIRGRP3=0 then Category="Age 40-59 All PIR groups "; else if ASDIST4B=2 and PIRGRP3=1 then Category="Age 40-59 - < 100 "; else if ASDIST4B=2 and PIRGRP3=2 then Category="Age 40-59 - 100 to 199 "; else if ASDIST4B=2 and PIRGRP3=3 then Category="Age 40-59 - 200 or more "; else if ASDIST4B=3 and PIRGRP3=0 then Category="Age 60+ All PIR groups "; else if ASDIST4B=3 and PIRGRP3=1 then Category="Age 60+ - < 100 "; else if ASDIST4B=3 and PIRGRP3=2 then Category="Age 60+ - 100 to 199 "; else if ASDIST4B=3 and PIRGRP3=3 then Category="Age 60+ - 200 or more "; end; else if ASDIST4B>=0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX>=0 and SMOKECFNX<0 then do; if ASDIST4B=0 and DMDEDUX=0 then Category="Total Age by Education "; else if ASDIST4B=0 and DMDEDUX=1 then Category="Total Age - =0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX>=0 then do; if ASDIST4B=0 and SMOKECFNX=0 then Category="Total Age by Smoking "; else if ASDIST4B=0 and SMOKECFNX=1 then Category="Total Age - Current "; else if ASDIST4B=0 and SMOKECFNX=2 then Category="Total Age - Former "; else if ASDIST4B=0 and SMOKECFNX=3 then Category="Total Age - Never "; else if ASDIST4B=1 and SMOKECFNX=0 then Category="Age 20-39 All Smoking "; else if ASDIST4B=1 and SMOKECFNX=1 then Category="Age 20-39 - Current "; else if ASDIST4B=1 and SMOKECFNX=2 then Category="Age 20-39 - Former "; else if ASDIST4B=1 and SMOKECFNX=3 then Category="Age 20-39 - Never "; else if ASDIST4B=2 and SMOKECFNX=0 then Category="Age 40-59 All Smoking "; else if ASDIST4B=2 and SMOKECFNX=1 then Category="Age 40-59 - Current "; else if ASDIST4B=2 and SMOKECFNX=2 then Category="Age 40-59 - Former "; else if ASDIST4B=2 and SMOKECFNX=3 then Category="Age 40-59 - Never "; else if ASDIST4B=3 and SMOKECFNX=0 then Category="Age 60+ All Smoking "; else if ASDIST4B=3 and SMOKECFNX=1 then Category="Age 60+ - Current "; else if ASDIST4B=3 and SMOKECFNX=2 then Category="Age 60+ - Former "; else if ASDIST4B=3 and SMOKECFNX=3 then Category="Age 60+ - Never "; end; keep tablename Category nsum rse percent sepercent mean semean ; run; PROC EXPORT DATA= NHANESAB.N4ToothLoss OUTFILE= "K:\DOH\EVERYONE\NHANES\MMWR19992002\N4ToothLoss.xls" DBMS=EXCEL2000 REPLACE; RUN; ********************************************************************************; /*NHANES 1988-1994*/ LIBNAME NHANEIII "K:/DOH/EVERYONE/NHANES/NHANES19881994/AnalysisFiles"; proc sort data=NHANEIII.nh3mmwr; by SDPSTRA6 SDPPSU6; run; /*Figure G1. Percemt of adults aged 20 years and older who have lost all their natural teeth* (all permanent teeth lost of 28 teeth, excluding 3rd molars), by selected characteristics -- United States, 1988-1994 and 1999-2002*/ proc descript data=NHANEIII.nh3mmwr design=wr;/*G1. Percent edentulous adults (28 teeth excluding 3rd molars) - not age adjusted*/ weight WTPFEX6; nest SDPSTRA6 SDPPSU6/strlev=1 psulev=2 missunit; var edentate28P; catlevel 1 ; subpopn ridageyr >=20 ; subgroup RIDRETH2 ASDIST4B RIAGENDR PIRGRP3 DMDEDUX smokecfnX ; level 5 3 2 3 3 3; tables ASDIST4B RIAGENDR RIDRETH2 PIRGRP3 DMDEDUX smokecfnX ASDIST4B*RIAGENDR ASDIST4B*RIDRETH2 ASDIST4B*PIRGRP3 ASDIST4B*DMDEDUX ASDIST4B*smokecfnX; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total percent sepercent / style =nchs totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f6.2 ; output nsum wsum total percent sepercent / filename=NHANEIII.N3G1u REPLACE filetype=SAS totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f5.2 ; rtitle "G1. N IIIphase I + II not age/sex adjusted (10 yr) Percent edentate(28 teeth excluding 3rd molars) (N3G1u)"; run; data NHANEIII.N3G1u; set NHANEIII.N3G1u; format tablename $8.; tablename="N3G1u "; run; proc descript data=NHANEIII.nh3mmwr design=wr;/*G1. Percent edentulous(28 teeth excluding 3rd molars) - age adjusted*/ weight WTPFEX6; nest SDPSTRA6 SDPPSU6 /strlev=1 psulev=2 missunit; var edentate28P ; catlevel 1 ; subpopn ridageyr >=20; subgroup ASDIST4Fa RIDRETH2 ASDIST4B RIAGENDR ; level 7 5 3 2 ; tables RIAGENDR ASDIST4B*RIAGENDR; Stdvar ASDIST4Fa; Stdwgt 0.185201 0.214603 0.217661 0.157158 0.103279 0.083085 0.039013; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total percent sepercent / style =nchs totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f6.2 ; output nsum wsum total percent sepercent / filename=NHANEIII.N3G1aa REPLACE filetype=SAS totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f5.2 ; rtitle "G1. N IIIphase I + II age adjusted (10 yr) Percent edentate(28 teeth excluding 3rd molars) (N3G1aa)"; run; data NHANEIII.N3G1aa; set NHANEIII.N3G1aa; format tablename $8.; tablename="N3G1aa "; run; proc descript data=NHANEIII.nh3mmwr design=wr;/*G1. Percent edentate(28 teeth excluding 3rd molars) - age/sex adjusted*/ weight WTPFEX6; nest SDPSTRA6 SDPPSU6 /strlev=1 psulev=2 missunit; var edentate28P ; catlevel 1 ; subpopn ridageyr >=20; subgroup ASDIST4B ASDIST4Da RIDRETH2 RIAGENDR PIRGRP3 DMDEDUX smokecfnX; level 3 14 5 2 3 3 3; tables ASDIST4B RIDRETH2 PIRGRP3 DMDEDUX smokecfnX ASDIST4B*RIDRETH2 ASDIST4B*PIRGRP3 ASDIST4B*DMDEDUX ASDIST4B*smokecfnX; Stdvar ASDIST4Da; Stdwgt 0.093163 0.092036 0.106732 0.107875 0.107360 0.110298 0.076017 0.081144 0.048185 0.055093 0.035780 0.047305 0.013877 0.025135 ; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total percent sepercent / style =nchs totalfmt=f13.1 percentfmt=f6.2 sepercentfmt=f6.2 wsumfmt=f15.1; output nsum wsum total percent sepercent / filename=NHANEIII.N3G1asa REPLACE filetype=SAS totalfmt=f13.1 wsumfmt=f15.1 percentfmt=f6.2 sepercentfmt=f5.2 ; rtitle "G1. N IIIphase I + II age/sex adjusted (10 yr) Percent edentate(28 teeth excluding 3rd molars) (N3G1asa)"; run; data NHANEIII.N3G1asa; set NHANEIII.N3G1asa; format tablename $8.; tablename="N3G1asa "; run; /*Figure G3. Mean number of permanent teeth among dentate adults aged 20 years and older, by selected characteristics -- United States, 1988-1994 and 1999-2002*/ proc descript data=NHANEIII.nh3mmwr design=wr;/*G3. Mean number of permanent teeth (based on 28) - not age adjusted*/ weight WTPFEX6; nest SDPSTRA6 SDPPSU6/strlev=1 psulev=2 missunit; var OHDNPRMa ; subpopn ridageyr >=20 and OHDPRMa=1; subgroup RIDRETH2 ASDIST4B RIAGENDR PIRGRP3 DMDEDUX smokecfnX ; level 5 3 2 3 3 3; tables ASDIST4B RIAGENDR RIDRETH2 PIRGRP3 DMDEDUX smokecfnX ASDIST4B*RIAGENDR ASDIST4B*RIDRETH2 ASDIST4B*PIRGRP3 ASDIST4B*DMDEDUX ASDIST4B*smokecfnX; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total mean semean / style =nchs totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; output nsum wsum total mean semean / filename=NHANEIII.N3G3u REPLACE filetype=SAS totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; rtitle "G3. N IIIphase I + II not age/sex adjusted (10 yr) Mean number of permanent teeth (based on 28) among dentate (N3G3u)"; run; data NHANEIII.N3G3u; set NHANEIII.N3G3u; format tablename $8.; tablename="N3G3u "; run; proc descript data=NHANEIII.nh3mmwr design=wr;/*G3. Mean number of permanent teeth (based on 28) - age adjusted*/ weight WTPFEX6; nest SDPSTRA6 SDPPSU6 /strlev=1 psulev=2 missunit; var OHDNPRMa ; subpopn ridageyr >=20 and OHDPRMa=1; subgroup ASDIST4Fa RIDRETH2 ASDIST4B RIAGENDR ; level 7 5 3 2 ; tables RIAGENDR ASDIST4B*RIAGENDR; Stdvar ASDIST4Fa; Stdwgt 0.185201 0.214603 0.217661 0.157158 0.103279 0.083085 0.039013; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total mean semean / style =nchs totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; output nsum wsum total mean semean / filename=NHANEIII.N3G3aa REPLACE filetype=SAS totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; rtitle "G3. N IIIphase I + II age adjusted (10 yr) Mean number of permanent teeth (based on 28) among dentate (N3G3aa)"; run; data NHANEIII.N3G3aa; set NHANEIII.N3G3aa; format tablename $8.; tablename="N3G3aa "; run; proc descript data=NHANEIII.nh3mmwr design=wr;/*G3. Mean number of permanent teeth (based on 28) - age/sex adjusted*/ weight WTPFEX6; nest SDPSTRA6 SDPPSU6 /strlev=1 psulev=2 missunit; var OHDNPRMa ; subpopn ridageyr >=20 and OHDPRMa=1; subgroup ASDIST4B ASDIST4Da RIDRETH2 RIAGENDR PIRGRP3 DMDEDUX smokecfnX; level 3 14 5 2 3 3 3; tables ASDIST4B RIDRETH2 PIRGRP3 DMDEDUX smokecfnX ASDIST4B*RIDRETH2 ASDIST4B*PIRGRP3 ASDIST4B*DMDEDUX ASDIST4B*smokecfnX; Stdvar ASDIST4Da; Stdwgt 0.093163 0.092036 0.106732 0.107875 0.107360 0.110298 0.076017 0.081144 0.048185 0.055093 0.035780 0.047305 0.013877 0.025135 ; rformat RIDRETH2 race. ; rformat riagendr sex. ; rformat ASDIST4B age. ; rformat PIRGRP3 pir. ; rformat DMDEDUX edu.; rformat smokecfnX smkcfn.; print nsum wsum total mean semean / style =nchs totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; output nsum wsum total mean semean / filename=NHANEIII.N3G3asa REPLACE filetype=SAS totalfmt=F13.1 wsumfmt=f15.1 meanfmt=f5.2 semeanfmt=f5.2 ; rtitle "G3. N IIIphase I + II age/sex adjusted (10 yr) Mean number of permanent teeth (based on 28) among dentate (N3G3asa)"; run; data NHANEIII.N3G3asa; set NHANEIII.N3G3asa; format tablename $8.; tablename="N3G3asa"; run; /*Compile estimates into one data set for export to MSExcel file (.xls)*/ data NHANEIII.N3ToothLoss; set NHANEIII.N3G1u NHANEIII.N3G1aa NHANEIII.N3G1asa NHANEIII.N3G3u NHANEIII.N3G3aa NHANEIII.N3G3asa ; if percent>0 then do; RSE=sepercent/percent; /*Relative Standard Error*/ end; if mean>0 then do; RSE=semean/mean; /*Relative Standard Error*/ end; if ASDIST4B>=0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if ASDIST4B=0 then Category="Total Age "; else if ASDIST4B=1 then Category="Age 20-39 "; else if ASDIST4B=2 then Category="Age 40-59 "; else if ASDIST4B=3 then Category="Age 60+ "; end; else if ASDIST4B<0 and RIDRETH2>=0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if RIDRETH2=0 then Category="Total Race/Ethn "; else if RIDRETH2=1 then Category="NH White "; else if RIDRETH2=2 then Category="NH Black "; else if RIDRETH2=3 then Category="Mexican American "; else if RIDRETH2=4 then Category="Other/MultiRace "; else if RIDRETH2=5 then Category="Other Hispanic "; end; else if ASDIST4B<0 and RIDRETH2<0 and RIAGENDR>=0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if RIAGENDR=0 then Category="Total Gender "; else if RIAGENDR=1 then Category="Male "; else if RIAGENDR=2 then Category="Female "; end; else if ASDIST4B<0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3>=0 and DMDEDUX<0 and SMOKECFNX<0 then do; if PIRGRP3=0 then Category="Total PIR "; else if PIRGRP3=1 then Category="<100 "; else if PIRGRP3=2 then Category="100-199 "; else if PIRGRP3=3 then Category=">=200 "; end; else if ASDIST4B<0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX>=0 and SMOKECFNX<0 then do; if DMDEDUx=0 then Category="Total Education "; else if DMDEDUx=1 then Category="=0 then do; if SMOKECFNx=0 then Category="Total Smoking "; else if SMOKECFNx=1 then Category="Current "; else if SMOKECFNx=2 then Category="Former "; else if SMOKECFNx=3 then Category="Never "; end; else if ASDIST4B>=0 and RIDRETH2>=0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if ASDIST4B=0 and RIDRETH2=0 then Category="Total Age by RaceEthn "; else if ASDIST4B=0 and RIDRETH2=1 then Category="Total Age - NH White "; else if ASDIST4B=0 and RIDRETH2=2 then Category="Total Age - NH Black "; else if ASDIST4B=0 and RIDRETH2=3 then Category="Total Age - Mex Am "; else if ASDIST4B=0 and RIDRETH2=4 then Category="Total Age - Other "; else if ASDIST4B=0 and RIDRETH2=5 then Category="Total Age - Other Hisp "; else if ASDIST4B=1 and RIDRETH2=0 then Category="Age 20-39 All RaceEthn "; else if ASDIST4B=1 and RIDRETH2=1 then Category="Age 20-39 - NH White "; else if ASDIST4B=1 and RIDRETH2=2 then Category="Age 20-39 - NH Black "; else if ASDIST4B=1 and RIDRETH2=3 then Category="Age 20-39 - Mex Am "; else if ASDIST4B=1 and RIDRETH2=4 then Category="Age 20-39 - Other "; else if ASDIST4B=1 and RIDRETH2=5 then Category="Age 20-39 - Other Hisp "; else if ASDIST4B=2 and RIDRETH2=0 then Category="Age 40-59 All RaceEthn "; else if ASDIST4B=2 and RIDRETH2=1 then Category="Age 40-59 - NH White "; else if ASDIST4B=2 and RIDRETH2=2 then Category="Age 40-59 - NH Black "; else if ASDIST4B=2 and RIDRETH2=3 then Category="Age 40-59 - Mex Am "; else if ASDIST4B=2 and RIDRETH2=4 then Category="Age 40-59 - Other "; else if ASDIST4B=2 and RIDRETH2=5 then Category="Age 40-59 - Other Hisp "; else if ASDIST4B=3 and RIDRETH2=0 then Category="Age 60+ All RaceEthn "; else if ASDIST4B=3 and RIDRETH2=1 then Category="Age 60+ - NH White "; else if ASDIST4B=3 and RIDRETH2=2 then Category="Age 60+ - NH Black "; else if ASDIST4B=3 and RIDRETH2=3 then Category="Age 60+ - Mex Am "; else if ASDIST4B=3 and RIDRETH2=4 then Category="Age 60+ - Other "; else if ASDIST4B=3 and RIDRETH2=5 then Category="Age 60+ - Other Hisp "; end; else if ASDIST4B>=0 and RIDRETH2<0 and RIAGENDR>=0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX<0 then do; if ASDIST4B=0 and RIAGENDR=0 then Category="Total Age by Gender "; else if ASDIST4B=0 and RIAGENDR=1 then Category="Total Age - Male "; else if ASDIST4B=0 and RIAGENDR=2 then Category="Total Age - Female "; else if ASDIST4B=1 and RIAGENDR=0 then Category="Age 20-39 Both Genders "; else if ASDIST4B=1 and RIAGENDR=1 then Category="Age 20-39 - Male "; else if ASDIST4B=1 and RIAGENDR=2 then Category="Age 20-39 - Female "; else if ASDIST4B=2 and RIAGENDR=0 then Category="Age 40-59 Both Genders "; else if ASDIST4B=2 and RIAGENDR=1 then Category="Age 40-59 - Male "; else if ASDIST4B=2 and RIAGENDR=2 then Category="Age 40-59 - Female "; else if ASDIST4B=3 and RIAGENDR=0 then Category="Age 60+ Both Genders "; else if ASDIST4B=3 and RIAGENDR=1 then Category="Age 60+ - Male "; else if ASDIST4B=3 and RIAGENDR=2 then Category="Age 60+ - Female "; end; else if ASDIST4B>=0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3>=0 and DMDEDUX<0 and SMOKECFNX<0 then do; if ASDIST4B=0 and PIRGRP3=0 then Category="Total Age by PIR "; else if ASDIST4B=0 and PIRGRP3=1 then Category="Total Age - < 100 "; else if ASDIST4B=0 and PIRGRP3=2 then Category="Total Age - 100 to 199 "; else if ASDIST4B=0 and PIRGRP3=3 then Category="Total Age - 200 or more "; else if ASDIST4B=1 and PIRGRP3=0 then Category="Age 20-39 All PIR groups "; else if ASDIST4B=1 and PIRGRP3=1 then Category="Age 20-39 - < 100 "; else if ASDIST4B=1 and PIRGRP3=2 then Category="Age 20-39 - 100 to 199 "; else if ASDIST4B=1 and PIRGRP3=3 then Category="Age 20-39 - 200 or more "; else if ASDIST4B=2 and PIRGRP3=0 then Category="Age 40-59 All PIR groups "; else if ASDIST4B=2 and PIRGRP3=1 then Category="Age 40-59 - < 100 "; else if ASDIST4B=2 and PIRGRP3=2 then Category="Age 40-59 - 100 to 199 "; else if ASDIST4B=2 and PIRGRP3=3 then Category="Age 40-59 - 200 or more "; else if ASDIST4B=3 and PIRGRP3=0 then Category="Age 60+ All PIR groups "; else if ASDIST4B=3 and PIRGRP3=1 then Category="Age 60+ - < 100 "; else if ASDIST4B=3 and PIRGRP3=2 then Category="Age 60+ - 100 to 199 "; else if ASDIST4B=3 and PIRGRP3=3 then Category="Age 60+ - 200 or more "; end; else if ASDIST4B>=0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX>=0 and SMOKECFNX<0 then do; if ASDIST4B=0 and DMDEDUX=0 then Category="Total Age by Education "; else if ASDIST4B=0 and DMDEDUX=1 then Category="Total Age - =0 and RIDRETH2<0 and RIAGENDR<0 and PIRGRP3<0 and DMDEDUX<0 and SMOKECFNX>=0 then do; if ASDIST4B=0 and SMOKECFNX=0 then Category="Total Age by Smoking "; else if ASDIST4B=0 and SMOKECFNX=1 then Category="Total Age - Current "; else if ASDIST4B=0 and SMOKECFNX=2 then Category="Total Age - Former "; else if ASDIST4B=0 and SMOKECFNX=3 then Category="Total Age - Never "; else if ASDIST4B=1 and SMOKECFNX=0 then Category="Age 20-39 All Smoking "; else if ASDIST4B=1 and SMOKECFNX=1 then Category="Age 20-39 - Current "; else if ASDIST4B=1 and SMOKECFNX=2 then Category="Age 20-39 - Former "; else if ASDIST4B=1 and SMOKECFNX=3 then Category="Age 20-39 - Never "; else if ASDIST4B=2 and SMOKECFNX=0 then Category="Age 40-59 All Smoking "; else if ASDIST4B=2 and SMOKECFNX=1 then Category="Age 40-59 - Current "; else if ASDIST4B=2 and SMOKECFNX=2 then Category="Age 40-59 - Former "; else if ASDIST4B=2 and SMOKECFNX=3 then Category="Age 40-59 - Never "; else if ASDIST4B=3 and SMOKECFNX=0 then Category="Age 60+ All Smoking "; else if ASDIST4B=3 and SMOKECFNX=1 then Category="Age 60+ - Current "; else if ASDIST4B=3 and SMOKECFNX=2 then Category="Age 60+ - Former "; else if ASDIST4B=3 and SMOKECFNX=3 then Category="Age 60+ - Never "; end; keep tablename Category nsum rse percent sepercent mean semean ; run; PROC EXPORT DATA= NHANEIII.N3ToothLoss OUTFILE= "K:\DOH\EVERYONE\NHANES\MMWR19992002\N3ToothLoss.xls" DBMS=EXCEL2000 REPLACE; RUN;