The
Stata data source allows writing, but not reading, data to a
Stata file, written natively in the
Stata Data Format (.dta). In addition to values, Stata
value labels are written, created from CSPro's
value set labels. This data source only supports writing the values from one
record, which by default is the first record defined in the dictionary. To specify writing data from another record, you must define the
"record" property in the
connection string.
This data source is similar to the other data sources that write to formats used by statistical software:
R,
SAS, and
SPSS.
The Stata data source is used when a file has the extension .dta.
The Stata data source supports the following features:
Feature | Supported |
Reading cases | ✘ |
Writing cases | ✔ |
Notes, case labels, and case statuses | ✘ |
Storage of more than one kind of record | ✘ |
Binary data items | ✘ |
Deleting cases | ✘ |
Undeleting cases | ✘ |
Syncing data | ✘ |
Cases with duplicate keys | ✘ |
Case identification via UUID | ✘ |
Contains an embedded dictionary | ✘ |
Allows record sorts | ✘ |
The following behavior can be customized by specifying properties in the
connection string. The default behavior is marked with ⁺⁺⁺.
Property Name and Values | Description |
|
"mappedSpecialValues" | Determines how the special values missing and refused are written. |
"codes" ⁺⁺⁺ | The value of the mapped code is written. For example, if missing is mapped to -99, then -99 is written. |
"suppress" | No value is written. |
|
"record" | If the name of a record is provided, only items from that record are written. |
For example, the following connection string, specified in a
batch PFF, would result in a Stata file containing the values of the
HOUSING_REC record:
OutputData=housing.dta|record=HOUSING_REC