Understanding and Using NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

19
1 Understanding and Using NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files Donald Cherry U.S.DEPARTM ENT O F HEALTH AND HUM AN SERVICES C enters forD isease C ontroland Prevention N ationalC enterforH ealth Statistics U.S.DEPARTM ENT O F HEALTH AND HUM AN SERVICES C enters forD isease C ontroland Prevention N ationalC enterforH ealth Statistics

description

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 - PowerPoint PPT Presentation

Transcript of Understanding and Using NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

Page 1: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

1

Understanding and Using

NAMCS and NHAMCS Data:

A Hands-On Workshop

Part II-Using Raw Data Files

Donald CherryU.S. DEPARTMENT OF HEALTH AND HUMAN SERVICESCenters for Disease Control and PreventionNational Center for Health Statistics

U.S. DEPARTMENT OF HEALTH AND HUMAN SERVICESCenters for Disease Control and PreventionNational Center for Health Statistics

Page 2: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

2

Session Goals A the end of this session I would like you A the end of this session I would like you

to:to: Be able to successfully download data Be able to successfully download data

files and create a SAS dataset for analysisfiles and create a SAS dataset for analysis Understand some of the limitations and Understand some of the limitations and

advantages of using NAMCS/NHAMCS advantages of using NAMCS/NHAMCS downloadable datadownloadable data

Perform simple analysesPerform simple analyses

Page 3: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

3

Using raw data files File structureFile structure Exercises using SUDAAN & SAS Proc SurveymeansExercises using SUDAAN & SAS Proc Surveymeans

Downloading data & creating a SAS datasetDownloading data & creating a SAS dataset Simple frequencies with/without standard errors Simple frequencies with/without standard errors Creating a new variable-AsthmaCreating a new variable-Asthma Visit rates-male/femaleVisit rates-male/female Total number of drug mentionsTotal number of drug mentions Antidepressant drug mentionsAntidepressant drug mentions Time spent with physicianTime spent with physician

Trend considerations Trend considerations Other issues--multiple years/settingsOther issues--multiple years/settings SummarySummary

Page 4: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

4

File Structure Download data and layout from websiteDownload data and layout from website

http://www.cdc.gov/nchs/about/major/ahcd/ahcd1.htmhttp://www.cdc.gov/nchs/about/major/ahcd/ahcd1.htm

Flat ASCII files for each setting and yearFlat ASCII files for each setting and yearNAMCS: 1973-2002NAMCS: 1973-2002NHAMCS: 1992-2002NHAMCS: 1992-2002

Page 5: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

5

Structure organizationProvider

provider infopractice info

geographic info

Visit patient & visit info

treatment & outcome infomedications

Medication 1 Medication 2 Medication 6Medication 5Medication 4Medication 3

Drug ingredient 1-5 Therapeutic class 1-3

Page 6: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

6

Double-click: My Computer\Local Disk Double-click: My Computer\Local Disk C:\DUC_04C:\DUC_04

Double-click: SAS file: ExercisesDouble-click: SAS file: Exercises

Hands-on Exercises

Page 7: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

7

proc surveyfreq data=namtest1;tables sex*ager;strata cstratm;cluster cpsum;weight patwt2;run;

SAS version 9.1 example

Page 8: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

8

Page 9: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

9

Visit estimates

PhycodePhycode SexSex PatwtPatwt (Patwt/(Patwt/Pop)*100Pop)*100

SexwtSexwt

14011401 11 100100 (100/800)*100(100/800)*100 12.512.5

15221522 11 300300 (300/800)*100(300/800)*100 37.537.5

10011001 11 5050 (50/800)*100(50/800)*100 6.256.25

500500 11 120120 (120/800)*100(120/800)*100 1515

71.2571.25

Female population=800 New variableCalculation*

*Note: Rate=est/pop=Σ patwt/pop=1/pop*Σ patwt.

Page 10: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

10

Arrays

PhycodePhycode PatcodePatcode Med1Med1 Med2Med2 Med3Med3 Med4Med4 Med5Med5 Med6Med6 TotalTotal

14311431 11 3290532905 9000090000 9000090000 9000090000 9000090000 9000090000 11

14311431 22 9500595005 0299502995 9000090000 9000090000 9000090000 9000090000 22

14311431 33 2674026740 9000090000 9000090000 9000090000 9000090000 9000090000 11

14311431 44 9000090000 9000090000 9000090000 9000090000 9000090000 9000090000 00

14311431 55 2122821228 3546535465 4029540295 9000090000 9000090000 9000090000 33

Note: 90000=No mention.

Total drug mentions: 7

Page 11: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

11

Some considerations: SUDAAN vs. SAS Proc Surveymeans

SUDAANSUDAAN PROC SurveymeansPROC Surveymeans••design variables=cstratm, design variables=cstratm, cpsum (1-stage design)cpsum (1-stage design)

••design variables=cstratm, design variables=cstratm, cpsum (1-stage design)cpsum (1-stage design)

••nest=cstratm, cpsumnest=cstratm, cpsum ••strata cstratm strata cstratm ••cluster cpsumcluster cpsum

••Sort by design variablesSort by design variables ••Sort not neededSort not needed••Weight data: Patwt2Weight data: Patwt2 ••Weight data: Patwt2Weight data: Patwt2••Subgroup=identify Subgroup=identify

categorical variables categorical variables••Class=identify categorical Class=identify categorical

variablesvariables••Tables=analysis variablesTables=analysis variables ••Var=analysis variablesVar=analysis variables

Page 12: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

12

Trend considerations Variables routinely rotate on and off surveyVariables routinely rotate on and off survey Be careful about trending diagnosis prior to 1979 Be careful about trending diagnosis prior to 1979

because of ICDA (based on ICD-8)because of ICDA (based on ICD-8) Even after 1980- be careful about changes in Even after 1980- be careful about changes in

ICD-9-CMICD-9-CM Number of medications varies over yearsNumber of medications varies over years

1980-81 – 8 medications1980-81 – 8 medications1985, 1989-94 – 5 medications1985, 1989-94 – 5 medications1995-2002 – 6 medications1995-2002 – 6 medications2003+8 – medications2003+8 – medications

Diagnostic & therapeutic checkboxes varyDiagnostic & therapeutic checkboxes vary Use spreadsheet for significance of trends Use spreadsheet for significance of trends

Page 13: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

13

Combining multiple years

2 year combinations are best for 2 year combinations are best for subpopulation analysissubpopulation analysis

3-4 year combinations for disease specific 3-4 year combinations for disease specific analysisanalysis

Keep adding years until you have at least 30 Keep adding years until you have at least 30 raw cases in important cellsraw cases in important cells

RSE improves incrementally with the RSE improves incrementally with the number of years combinednumber of years combined

Page 14: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

14

RSE improves incrementally with the number of years combined

RSE = SE/RSE = SE/xx

RSE for percent of visits by persons less RSE for percent of visits by persons less than 21 years of age with diabetesthan 21 years of age with diabetes 1999 RSE = .08/.18 = .44 (44%)1999 RSE = .08/.18 = .44 (44%) 1998 & 1999 RSE = .06/.18 = .33 (33%)1998 & 1999 RSE = .06/.18 = .33 (33%) 1998, 1999, & 2000 RSE = .05/.21 = .24 1998, 1999, & 2000 RSE = .05/.21 = .24

(24%)(24%)

Page 15: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

15

NAMCS, ED, and OPD can be combined in one or NAMCS, ED, and OPD can be combined in one or multiple yearsmultiple years

NAMCS & OPD variables virtually identical, NAMCS & OPD variables virtually identical, many ED variables are samemany ED variables are same

OPD and NAMCS should be combined to get OPD and NAMCS should be combined to get estimates of ambulatory physician care especially estimates of ambulatory physician care especially for African-American, Medicaid or adolescent for African-American, Medicaid or adolescent subpopulationssubpopulations

Only NAMCS has physician specialtyOnly NAMCS has physician specialty

Combining multiple settings

Page 16: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

16

2001*

3- & 4-Stage

design variables

2003

2002

1-Stage design

variables only

1-Stage design

variables

3- & 4-Stage design

variables

Design Variables—Survey Years

*Plan to re-release years with 1-stage design variables.

Page 17: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

17

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);

Page 18: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

18

If nothing else, remember…The Public Use Data File Documentation is

YOUR FRIEND! Each booklet includes:Each booklet includes:

A description of the surveyA description of the survey Record formatRecord format Marginal data (summaries)Marginal data (summaries) Various definitionsVarious definitions Reason for Visit classification codesReason for Visit classification codes Medication & generic namesMedication & generic names Therapeutic classesTherapeutic classes

Page 19: Understanding and Using  NAMCS and NHAMCS Data: A Hands-On Workshop Part II-Using Raw Data Files

19

Where to get more information?

www.cdc.gov/nchs/about/major/ahcd1.htmwww.cdc.gov/nchs/about/major/ahcd1.htm

Call Ambulatory Care Statistics Branch at Call Ambulatory Care Statistics Branch at 301-458-4600301-458-4600