Understanding and Using NAMCS and NHAMCS Data A



















- Slides: 19
Understanding and Using NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files Donald Cherry 1
Session Goals n A the end of this session I would like you to: u Be able to successfully download data files and create a SAS dataset for analysis u Understand some of the limitations and advantages of using NAMCS/NHAMCS downloadable data u Perform simple analyses 2
Using raw data files n n n File structure Exercises using SUDAAN & SAS Proc Surveymeans u Downloading data & creating a SAS dataset u Simple frequencies with/without standard errors u Creating a new variable-Asthma u Visit rates-male/female u Total number of drug mentions u Antidepressant drug mentions u Time spent with physician Trend considerations Other issues--multiple years/settings Summary 3
File Structure n Download data and layout from website http: //www. cdc. gov/nchs/about/major/ahcd 1. htm n Flat ASCII files for each setting and year NAMCS: 1973 -2002 NHAMCS: 1992 -2002 4
Structure organization Provider provider info practice info geographic info Visit patient & visit info treatment & outcome info medications Medication 1 Medication 2 Medication 3 Medication 4 Drug ingredient 1 -5 Medication 6 Therapeutic class 1 -3 5
Hands-on Exercises n Double-click: My ComputerLocal Disk C: DUC_04 n Double-click: SAS file: Exercises 6
SAS version 9. 1 example proc surveyfreq data=namtest 1; tables sex*ager; strata cstratm; cluster cpsum; weight patwt 2; run; 7
8
Visit estimates Female population=800 Calculation* New variable Phycode Sex Patwt (Patwt/Pop)*100 Sexwt 1401 1 100 (100/800)*100 12. 5 1522 1 300 (300/800)*100 37. 5 1001 1 50 (50/800)*100 6. 25 500 1 120 (120/800)*100 15 71. 25 *Note: Rate=est/pop=Σ patwt/pop=1/pop*Σ patwt. 9
Arrays Phycode Patcode Med 1 Med 2 Med 3 Med 4 Med 5 Med 6 Total 1431 1 32905 90000 90000 1 1431 2 95005 02995 90000 2 1431 3 26740 90000 90000 1 1431 4 90000 90000 0 1431 5 21228 35465 40295 90000 3 Total drug mentions: 7 Note: 90000=No mention. 10
Some considerations: SUDAAN vs. SAS Proc Surveymeans SUDAAN PROC Surveymeans • design variables=cstratm, cpsum (1 -stage design) • nest=cstratm, cpsum • strata cstratm • cluster cpsum • Sort by design variables • Sort not needed • Weight data: Patwt 2 • Subgroup=identify • Class=identify categorical variables • Tables=analysis variables • Var=analysis variables 11
Trend considerations n n Variables routinely rotate on and off survey Be careful about trending diagnosis prior to 1979 because of ICDA (based on ICD-8) Even after 1980 - be careful about changes in ICD-9 -CM Number of medications varies over years 1980 -81 – 8 medications 1985, 1989 -94 – 5 medications 1995 -2002 – 6 medications 2003+8 – medications n n Diagnostic & therapeutic checkboxes vary Use spreadsheet for significance of trends 12
Combining multiple years 2 year combinations are best for subpopulation analysis n 3 -4 year combinations for disease specific analysis n Keep adding years until you have at least 30 raw cases in important cells n RSE improves incrementally with the number of years combined n 13
RSE improves incrementally with the number of years combined n RSE = SE/x n RSE for percent of visits by persons less than 21 years of age with diabetes ü ü ü 1999 RSE =. 08/. 18 =. 44 (44%) 1998 & 1999 RSE =. 06/. 18 =. 33 (33%) 1998, 1999, & 2000 RSE =. 05/. 21 =. 24 (24%) 14
Combining multiple settings n n NAMCS, ED, and OPD can be combined in one or multiple years NAMCS & OPD variables virtually identical, many ED variables are same n OPD and NAMCS should be combined to get estimates of ambulatory physician care especially for African-American, Medicaid or adolescent subpopulations n Only NAMCS has physician specialty 15
Design Variables—Survey Years 2001* 2002 3 - & 4 -Stage 1 -Stage design variables 3 - & 4 -Stage design variables 2003 1 -Stage design variables only *Plan to re-release years with 1 -stage design variables. 16
Code to create design variables: survey years 2001 & earlier CPSUM=PSUM; CSTRATM = STRATM; IF CPSUM IN(1, 2, 3, 4) THEN DO; CPSUM = PROVIDER +100000; CSTRATM = (STRATM*100000) +(1000*(MOD(YEAR, 100))) + (SUBFILE*100) + PROSTRAT; END; ELSE CSTRATM = (STRATM*100000); 17
If nothing else, remember…The Public Use Data File Documentation is YOUR FRIEND! n Each booklet includes: u A description of the survey u Record format u Marginal data (summaries) u Various definitions u Reason for Visit classification codes u Medication & generic names u Therapeutic classes 18
Where to get more information? n www. cdc. gov/nchs/about/major/ahcd 1. htm n Call Ambulatory Care Statistics Branch at 301 -458 -4600 19