190 likes | 211 Views
Understanding and Using NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files Donald Cherry. Session Goals. A the end of this session I would like you to: Be able to successfully download data files and create a SAS dataset for analysis
E N D
Understanding and Using NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files Donald Cherry
Session Goals • A the end of this session I would like you to: • Be able to successfully download data files and create a SAS dataset for analysis • Understand some of the limitations and advantages of using NAMCS/NHAMCS downloadable data • Perform simple analyses
Using raw data files • File structure • Exercises using SUDAAN & SAS Proc Surveymeans • Downloading data & creating a SAS dataset • Simple frequencies with/without standard errors • Creating a new variable-Asthma • Visit rates-male/female • Total number of drug mentions • Antidepressant drug mentions • Time spent with physician • Trend considerations • Other issues--multiple years/settings • Summary
File Structure • Download data and layout from website http://www.cdc.gov/nchs/about/major/ahcd/ahcd1.htm • Flat ASCII files for each setting and year NAMCS: 1973-2002 NHAMCS: 1992-2002
Hands-on Exercises • Double-click: My Computer\Local Disk C:\DUC_04 • Double-click: SAS file: Exercises
SAS version 9.1 example procsurveyfreq data=namtest1; tables sex*ager; strata cstratm; cluster cpsum; weight patwt2; run;
Visit estimates Female population=800 Calculation* New variable *Note: Rate=est/pop=Σ patwt/pop=1/pop*Σ patwt.
Arrays Total drug mentions: 7 Note: 90000=No mention.
Trend considerations • 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 • Diagnostic & therapeutic checkboxes vary • Use spreadsheet for significance of trends
Combining multiple years • 2 year combinations are best for subpopulation analysis • 3-4 year combinations for disease specific analysis • Keep adding years until you have at least 30 raw cases in important cells • RSE improves incrementally with the number of years combined
RSE improves incrementally with the number of years combined • RSE = SE/x • 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%)
Combining multiple settings • NAMCS, ED, and OPD can be combined in one or multiple years • NAMCS & OPD variables virtually identical, many ED variables are same • OPD and NAMCS should be combined to get estimates of ambulatory physician care especially for African-American, Medicaid or adolescent subpopulations • Only NAMCS has physician specialty
Design Variables—Survey Years 2002 2001* 1-Stage design variables 3- & 4-Stage design variables 3- & 4-Stage design variables 2003 1-Stage design variables only *Plan to re-release years with 1-stage design variables.
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);
If nothing else, remember…The Public Use Data File Documentation is YOUR FRIEND! • Each booklet includes: • A description of the survey • Record format • Marginal data (summaries) • Various definitions • Reason for Visit classification codes • Medication & generic names • Therapeutic classes
Where to get more information? • www.cdc.gov/nchs/about/major/ahcd1.htm • Call Ambulatory Care Statistics Branch at 301-458-4600