Skip to main content
U.S. flag

An official website of the United States government

What kind of data formats does SAMHDA distribute?

SAMHDA distributes data files in the following formats: SAS, SPSS, Stata, ASCII, tab-delimited, and R. ASCII data files can be downloaded with their accompanying SAS, SPSS, or Stata setup files.

SAS

SAS transport files are generated by the SAS XPORT (for studies with older release dates) and SAS CPORT (for studies with newer release dates) procedures. Both types of files contain specially formatted SAS data sets, which have variable labels as well as data. SAMHDA's SAS CPORT files include SAS format catalogs with value labels. SAMHDA also supplies a SAS supplemental syntax file that provides missing value recodes.

SAS CPORT files should be imported into SAS with the SAS CIMPORT procedure. See "FAQs: Data Formats and Files" for additional information.

Because SAS has an engine that reads SAS XPORT files, these files can be read by any SAS command that can read an ordinary SAS data set, such as the SAS set statement or the SAS FREQ procedure. SAS XPORT files can also be converted to standard SAS data sets with the SAS COPY procedure.

SPSS

SAMHDA distributes two types of SPSS data files:

  1. SPSS .sav files written by the SPSS save command
  2. SPSS portable files written by the SPSS export command

Both types of data files include variable labels and usually include value labels and missing value definitions.

Use the SPSS "get" command to load SPSS .sav files into SPSS. Use the SPSS "import" command to read SPSS portable files into SPSS.

Stata

Stata data files should be loaded using the Stata "use" command.

R

Use the R "load ()" command to load R .rda files into R. For example, if your downloaded data file, 32722-0001-Data.rda is located at D:/Downloads/32722/DS0001, then use load("D:/Downloads/32722/DS0001/32722-0001-Data.rda").

Was this helpful?
Was this helpful?
I did not find the pages helpful because the content on the page: (check all that apply)
I did not find the pages helpful checkboxes