DATAFILES ][ ASCII ][  SAS  ][ SASXPORT  ][ SUDAAN  ][ SUDXPORT  ][ SPSS  ]

SAS® DATA FILES

SAS® INPUT

Standalone SUDAAN will not read SAS data sets. However, beginning with release 7.5.4, all standalone versions of SUDAAN can read SAS XPORT data sets. Use the FILETYPE = SASXPORT on the PROC statement.

SAS-callable versions of SUDAAN can read any data sets accepted by SAS. Indicate to SUDAAN that your input data is a SAS data set by using the FILETYPE=SAS parameter on the PROC statement.

SAS® OUTPUT

Beginning with release 7.5.4, all standalone versions of SUDAAN can write SAS XPORT data sets using the FILETYPE=SASXPORT on the OUTPUT statement. Only SAS-callable SUDAAN can write other SAS data sets. Use the FILETYPE=SAS parameter on the OUTPUT statement to indicate to SAS-callable SUDAAN that your output data set should be a SAS data set.

Providing SAS Formats in Standalone SUDAAN

What SAS calls a format, SUDAAN refers to as labels for levels of categorical variables. ("format" is the specification SUDAAN uses for the statistics it generates, such as F12.6 or E10.) We use the phrase "format file" to refer to a file created by SAS and containing SAS formats.

You can specify SAS formats (text labels) for categorical variables in two ways:

1: Provide a format library file generated by SAS. Those formats must either be referenced in the SAS data set itself, or else you must include FORMAT statements in your SUDAAN program file to reference them.

2: Provide comparable text via a LEVEL FILE.

If you provide formats for your SAS data set by either means, SUDAAN uses them as follows: When you produce PRINT tables, then the text label provided for any categorical variable will be used as a row or column label in the PRINT tables in which that variable appears.

When you produce an OUTPUT file containing a categorical variable for which level labels were provided, then those level labels will be passed to the OUTPUT file's documentation files.

Providing SAS Formats in SAS-callable SUDAAN

SAS-callable SUDAAN will automatically look for any SAS formats named in your SAS data set. You can also use the RFORMAT statement to associate a SAS format created by SAS PROC FORMAT with a SAS variable.

SUDAAN will look for a format in the format library under the specified format_name. If it finds that format_name, it uses its text for the one or more listed variables’ labels in PRINT tables and OUTPUT file documentation.