The PANEL Procedure

FLATDATA Statement

  • FLATDATA options </OUT=SAS-data-set>;

The FLATDATA statement allows you to use PROC PANEL when you have data in flat (or wide) format, where all measurements for a given cross section are contained within one observation. See Example 27.7 for a demonstration. If you have flat data, you should issue the FLATDATA statement first in PROC PANEL, before you reference any variables you create with this statement.

The following options must be specified in the FLATDATA statement:

BASE=(basename basename … basename)

specifies the variables that are to be transformed into a proper PROC PANEL format. All variables to be transformed must be named according to the convention: basename_timeperiod. You supply just the basenames, and the procedure extracts the appropriate variables to transform. If some year’s data are missing for a variable, then PROC PANEL detects this and fills in with missing values.

INDID=variable

names the variable in the input data set that uniquely identifies each individual. The INDID variable can be a character or numeric variable.

KEEP=(variable variable … variable)

specifies the variables that are to be copied without any transformation. These variables remain constant with respect to time when the data are converted to PROC PANEL format. This is an optional item.

TSNAME=name

specifies a name for the generated time identifier. The name must satisfy the requirements for the name of a SAS variable. The name can be quoted, but it must not be the name of a variable in the input data set.

The following options can be specified on the FLATDATA statement after the slash (/):

OUT =SAS-data-set

saves the converted flat data set to a PROC PANEL formatted data set.