/************************************************************************** | STATA SETUP FILE FOR ICPSR 06863 | KNOWLEDGE, ATTITUDES, AND PRACTICE OF CONTRACEPTION IN | TAIWAN: SECOND PROVINCE-WIDE FERTILITY SURVEY (KAP II), | 1967 | | | Please edit this file as instructed below. | To execute, start Stata, change to the directory containing: | - this do file | - the ASCII data file | - the dictionary file | | Then execute the do file (e.g., do 06863-0001-statasetup.do) | **************************************************************************/ set mem 8m /* Allocating 8 megabyte(s) of RAM for Stata SE to read the data file into memory. */ set more off /* This prevents the Stata output viewer from pausing the process*/ /**************************************************** Section 1: File Specifications This section assigns local macros to the necessary files. Please edit: "raw-datafile-name" ==> The name of data file downloaded from ICPSR "dictionary-filename" ==> The name of the dictionary file downloaded. "stata-datafile" ==> The name you wish to call your Stata data file. "my data" ==> The label you wish to assign to your data file (optional). Note: We assume that the raw data, dictionary, and DDS (this do file) all reside in the same directory (or folder). If that is not the case you will need to include paths as well as filenames in the macros. ********************************************************/ local raw_data "06863-0001-Data.txt" local dict "06863-0001-Stata_dictionary.dct" local outfile "kap_1967" label data "My Data" /******************************************************** Section 2: Infile Command This section reads the raw data into Stata format. If Section 1 was defined properly, there should be no reason to modify this section. These macros should inflate automatically. **********************************************************/ infile using `dict', using (`raw_data') clear label data "KNOWLEDGE, ATTITUDES, AND PRACTICE OF CONTRACEPTION IN TAIWAN: SECOND PROVINCE-WIDE FERTILITY SURVEY (KAP II), 1967 , Part 0001" #delimit ; #delimit cr /******************************************************************** Section 3: Save Outfile This section saves out a Stata system format file. There is no reason to modify it if the macros in Section 1 were specified correctly. *********************************************************************/ save `outfile', replace