Error processing SSI file
Skip directly to search Skip directly to A to Z list Skip directly to navigation Skip directly to site content Skip directly to page options
CDC Home

Error processing SSI file

Instructions: Step-by-Step Guide to Accessing NHAMCS-ED Public Use Data Files and Programs to Select Injury Records and Calculate Visit Rates

SAS and SUDAAN Programs for Variance Estimation

Sample SAS and SUDAAN codes and documentation for variance estimation of complete NHAMCS-ED data.

Sample Codes for 2002-2005

PROC SORT DATA=xxx; /* replace xxx with the name that you want to use for your SAS dataset */
BY CSTRATM CPSUM;

PROC CROSSTAB DATA=xxx DESIGN=WR FILETYPE=SAS;
NEST CSTRATM CPSUM/MISSUNIT;
WEIGHT PATWT;
CLASS SEX; /* replace SEX with the variable that you would like to use */
TABLES SEX; /* replace SEX with the variable that you would like to use */
PRINT /STYLE=NCHS;
RUN;

Sample Codes for 1993-2001

Step 1

Since the two variables, “CSTRATM” & “CPSUM”, for variance estimation is not included in data files before 2002. The following program is needed to calculate them from existing variables from the public use data file. This code needs to be included in a SAS data step.

CSTRATM=STRATM;
CPSUM=PSUM;
IF CPSUM IN (1 2 3 4) THEN DO;
CSTRATM=(STRATM*100000)+(1000*(MOD(YEAR,100)))+
(SUBFILE*100)+PROSTRAT;
CPSUM=PROVIDER+100000;
END;
ELSE CSTRATM=(STRATM*100000);

Step 2

Sample SAS and SUDAAN codes for variance estimation

PROC SORT DATA=xxx; /* replace xxx with the name that you want to use for your SAS dataset */
BY CSTRATM CPSUM;

PROC CROSSTAB DATA=xxx DESIGN=WR FILETYPE=SAS;
NEST CSTRATM CPSUM/MISSUNIT;
WEIGHT PATWT;
CLASS SEX; /* replace SEX with the variable that you would like to use */
TABLES SEX; /* replace SEX with the variable that you would like to use */
PRINT /STYLE=NCHS;
RUN;

 
Error processing SSI file
Error processing SSI file
Error processing SSI file
Error processing SSI file
Error processing SSI file
  • Page last reviewed: November 6, 2015
  • Page last updated: June 15, 2010
Error processing SSI file
USA.gov: The U.S. Government's Official Web PortalDepartment of Health and Human Services
Centers for Disease Control and Prevention   1600 Clifton Rd. Atlanta, GA 30329-4027, USA
800-CDC-INFO (800-232-4636) TTY: (888) 232-6348 - Contact CDC-INFO