Saving data files in Stata format
- Data can be written in Stata 5–13 format and in both Intercooled and SE format (version 7 or later).
- Data files that are saved in Stata 5 format can be read by Stata 4.
- The first 80 bytes of variable labels are saved as Stata variable labels.
- For Stata releases 4-8, the first 80 bytes of value labels for numeric variables are saved as Stata value labels. For Stata release 9 or later, the complete value labels for numeric variables are saved. Value labels are dropped for string variables, non-integer numeric values, and numeric values greater than an absolute value of 2,147,483,647.
- For versions 7 and later, the first 32 bytes of variable names in case-sensitive form are saved as Stata variable names. For earlier versions, the first eight bytes of variable names are saved as Stata variable names. Any characters other than letters, numbers, and underscores are converted to underscores.
- IBM® SPSS® Statistics variable names that contain multi-byte characters (for example, Japanese or Chinese characters) are converted to generic single-byte variable names.
- For versions 5–6 and Intercooled versions 7 and later, the first 80 bytes of string values are saved. For Stata SE 7–12, the first 244 bytes of string values are saved. For Stata SE 13 or later, complete string values are saved, regardless of length.
- For versions 5–6 and Intercooled versions 7 and later, only the first 2,047 variables are saved. For Stata SE 7 or later, only the first 32,767 variables are saved.
IBM SPSS Statistics Variable Type | Stata Variable Type | Stata Data Format |
---|---|---|
Numeric | Numeric | g |
Comma | Numeric | g |
Dot | Numeric | g |
Scientific Notation | Numeric | g |
Date*, Datetime | Numeric | D_m_Y |
Time, DTime | Numeric | g (number of seconds) |
Wkday | Numeric | g (1–7) |
Month | Numeric | g (1–12) |
Dollar | Numeric | g |
Custom Currency | Numeric | g |
String | String | s |
*Date, Adate, Edate, SDate, Jdate, Qyr, Moyr, Wkyr