• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
      • CSPro DB
      • Encrypted CSPro DB
      • Text
      • JSON
      • None
      • In-Memory
      • Comma Delimited (CSV)
      • Semicolon Delimited
      • Tab Delimited
      • Excel
      • R
      • SAS
      • SPSS
      • Stata
      • CSPro Export
      • Case Read Optimization
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Stata Data Source

Overview
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.
Functionality
The Stata data source supports the following features:
FeatureSupported
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
✘
Customizable Behavior
The following behavior can be customized by specifying properties in the connection string. The default behavior is marked with ⁺⁺⁺.
Property Name and ValuesDescription
 
"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
See also: Data Sources