Events
« September 2010 »
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
2627282930
Archives Search

Search UC-UTCC Archives
 

Related Websites
The Townsend Thai Project

The University of Chicago

University of the Thai Chamber of Commerce

The Interuniversity Consortium for Political and Social Research (ICPSR)

Dataverse Network Project

Follow us on Twitter
Printer-friendly versionSend to friendPDF version
Prepare Data

1. Download the dataset setup files from UC-UTCC Dataverse. Please follow UC-UTCC Dataverse user guide. Any question about UC-UTCC Dataverse, please contact Dataverse support email: rapeepong@dvn.utcc.ac.th

Download setup file of National Rural Development 2005 from UC-UTCC Dataverse.
 
Figure 1 Download setup file of National Rural Development 2005 from UC-UTCC Dataverse.

2. Please read and understand term of use before downloading each dataset. If you accept the term of use, make a checkbox “I agree and accept these terms of use” checked and click Continue button. Or not, click Cancel button.

Term of use
Figure 2 Term of use

3. Click Save button on the file download dialog box. And select the directory to save this file.


Save dataset setup file to local computer.

Figure 3 Save dataset setup file to local computer.

4. After downloading, you have to decompress the dataset setup files in your local computer. Figure 4 is just one of several ways to extract zip file in local computer. You can choose other solutions to extract file if you cannot follow this figure.

Extract setup file
Figure 4 Extract setup file

In Figure 4, we extract downloading file on the C drive.

5. Some dataset has a large size. So we have to separate the dataset into several parts. You don’t need to import all parts in SAS. Just import the interesting part to SAS for use.
For each part or dataset, there are many setup files and 1 ASCII data file. For SAS, we use only 2 files.
• A columnar ASCII data file (.txt)
• A SAS syntax file (.txt)

Setup file for National Rural Development 2005 Part 1
Figure 5 Setup file for National Rural Development 2005 Part 1

 

In Figure 5, we use these below files to import National Rural Development 2005 Part 1 (NRD2005 Part 1) to SAS. The path for reference is C:\NRD2005_setup_file\NRD2005_PART1
• NRD2005_PART1_DATA.txt
• NRD2005_PART1_setupSAS.txt

Import data to SAS

1. Open SAS program.


SAS for Windows

Figure 6 SAS for Windows
 

2. To open the SAS setup file, click on File -> Open.

Open menu
Figure 7 Open menu

3. Select the SAS setup file in File Dialog box.
Look in: Choose the path where the SAS setup file is located.
File of type: Set type to All files.
File name: Click on the SAS setup file. The name will appear after file name.
• Click Open button for open the SAS setup file.

Open SAS setup file
Figure 8 Open SAS setup file
 

In Figure 8, we choose the SAS setup file of National Rural Development 2005 Part 1 (NRD2005_PART1_setupSAS.txt). The path is C:\NRD2005_setup_file\NRD2005_PART1

4. SAS will display the file in the SAS Editor.

SAS Editor
Figure 9 SAS Editor

5. Enter the full path and name of the raw ASCII data file in SAS Editor.
FILENAME INDATA -- Enter the full path and name of the raw ASCII data file.
LIBNAME LIBRARY -- Enter the full path of the raw ASCII data file.

Enter the full path of the data file
Figure 10 Enter the full path of the data file
 

In Figure 10, we enter the full path and name of the raw ASCII data file for the National Rural Development 2005 Part 1. Commands should read:
FILENAME INDATA ‘C:\NRD2005_setup_file\NRD2005_PART1\NRD2005_PART1_DATA.txt’;
LIBNAME LIBRARY ‘C:\NRD2005_setup_file\NRD2005_PART1\’;

6. After editing the path, click on Run -> Submit to run command. The data will import to SAS program.

Submit command
Figure 11 Submit command

7. After submit command, data will import to SAS program. You can see detail of the dataset in SAS Output.

SAS Output
Figure 12 SAS Output
 

8. To view the data, Click on Explorer tab.

Explorer tab
Figure 13 Explorer tab

9. The data file will be located in the Work library. Click on Work icon in SAS Explorer.

Work library
Figure 14 Work library
 

10. You will see In data file in Work library. Click on In icon to view data.

Data file in Work library
Figure 15 Data file in Work library
 

11. You can see data in SAS View Table. Now data can be ready for analysis in SAS.

SAS View Table
Figure 16 SAS View Table
Reference

http://www.icpsr.umich.edu/cocoon/SAMHDA/FAQ/0056.xml
http://www.icpsr.umich.edu/cocoon/SAMHDA/FAQ/0061.xml
http://www.icpsr.umich.edu/cocoon/SAMHDA/FAQ/0127.xml

Author: Sirivimol Thanchalatudom
Reviewer: Phongkiat Koopkan

Our Services
UC-UTCC Data Depository TSpower (Visualization System)SET Smart Enterprise