17
Learning the TSP: a guide for students at the 国国国国国国国国国国 For the following classes For the following classes of of Professor Tadashi Professor Tadashi Yamada: Yamada: Microeconomics Microeconomics Statistics Statistics Human Resources Human Resources prep:JCB,’02

Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Embed Size (px)

Citation preview

Page 1: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Learning the TSP:a guide for students at the 国際総合学類筑波大学

For the following For the following classes of classes of

Professor Tadashi Professor Tadashi Yamada:Yamada:

MicroeconomicsMicroeconomicsStatisticsStatistics

Human ResourcesHuman Resourcesprep:JCB,’02

Page 2: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Learning the TSP:a guide for students at the 国際総合学類筑波大学

If you are using a network browser to view this program, please use the “back” button to go to the previous page. Download the entire file to a disk and run the program from there. It will keep your machines from “hanging” as running PowerPoint on the net takes up a large amount of memory. Downloading: point mouse to filename, right click and choose “Save file”.

This tutorial is basic and is intended for those running basic statistical/econometric analysis. For more advanced students please refer to the TSP programming manual

TSP is a copyrighted software. The college and the institute do have a site license. Thus, you can access and use the program at any computer terminal in the College.

Page 3: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Data: X’s and Y’s

Gather the needed Gather the needed data.data.

- What are you investigating?

- What data is relevant to this topic?

- Possible sources are:

(a) data books

(b) internet

(c) survey sheets

Two ways of putting together your data will be discussed in two sections of this basic tutorial.

- Input gathered data in a spreadsheet program.

- Input gathered data using a text editor.

Learning the TSP

For example, the Japan Statistics Bureau have a collection of data

online. Choose the relevant data and type a table then save in a file.

Page 4: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Data: X’s and Y’s 2

Values should be typed Values should be typed top to bottomtop to bottom.

Some students put the name of variable on the left and then type data horizontally. This will not be read by TSP.

Please type in data vertically. It will save you a lot of time.

Learning the TSP

Page 5: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Data: X’s and Y’s 3

Except for the variable name, all data should all data should be numerical be numerical valuesvalues, i.e., numbers.

Learning the TSP

No letters allowed as data!

Page 6: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Data: X’s and Y’s 4

A spreadsheet program will help you create graphs if you want to, but any any well presented tablewell presented table will be useful later when passing in your report.

Learning the TSP

well presented table

Page 7: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Setting the Data File: Spreadsheet Format

This section describes how to input and format spreadsheet data files for use with the TSP program. This uses the Excel as the main example although other spreadsheet programs will work.

Page 8: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Spreadsheet formats

Presented Table using a spreadsheet program

To be able to submit a well-presented table, the standard spreadsheet programs are helpful. In this case, a data set on the Japanese labor market is presented.

Learning the TSP

Page 9: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Setting the Data File for TSP Use: EXCEL Consider that you have a table presented below.

Step 1. Delete all irrelevant information and designs.Step 2. On the first line of the edited file, put variable names, what you want to call the variables, on the first line.

In TSP (and other Statistics Programs) the first row is the variable name: 8 characters ( 英数) long and in Roman Alphabet.

Learning the TSP

Reminder:Reminder: This table will This table will NOT be read by TSP. Make NOT be read by TSP. Make sure you save it however, sure you save it however, you need to submit a well-you need to submit a well-presented table of the data presented table of the data you used together with you used together with your report. your report.

Page 10: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Setting the Data File: EXCEL After following the previous instructions, your worksheet should

now look like the one presented below. Copy and Paste entire worksheet to a new file. (Menu bar: File,

new ( ファイル新規作成)) Variable Names – make them easy to remember! Save this new worksheet under another name.

Learning the TSP

Obs = observation 1~47 for each prefecture. Thus, 1=Hokkaido

malehrwg = 男性・月平均労働時間

NO SPACES BETWEEN COLUMN AND ROWS!

Page 11: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Setting the Data File: EXCEL Save your working

file, using “SaveAs” [ 名前をつけて保存 ]

The filename must be 8 characters long and no spaces in between.

Pull down the scroll bar for file type ( ファイル種類 ) then save your working file as version 4 on Excel or ver3 or less on Lotus.

(Note:TSP45 cannot read EXCEL97~ formats)

Learning the TSP

Page 12: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Setting the Data File: Text Editor File

This section describes how to use ASCII inputted data for the TSP program. TeraPad, NotePad, EmEditor etc. can be used for this section.

Page 13: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Sample Tables: formats

Presented Table using a text editor

As example, a data set on the US economy is used.

Learning the TSP

Page 14: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Setting the Data File: TXT File Consider that you have

a table presented as follows:

The FIRST ROW MUST CONTAIN THE VALUES FOR THE INITIAL OBSERVATION.

Values have to be separated by tab spaces.

This table might be informative but this will NOT be read by TSP.

Remember you need to pass a well-presented table. So save this file!

Learning the TSP

REMOVE TITLE, SPACES AND BARS and LABELS. THE FIRST LINE HAS INITIAL OBSERVATION’S VALUES!

REMOVE ANY OTHER INFORMATION THAT ARE NOT VARIABLE VALUES.

VALUES ARE SEPARATED BY “TAB” SPACES

Page 15: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Setting the Data File: TXT File2

After following the instructions from the previous slide, the new table would now look like this.

There is no name on the first line for a TSP-enabled text data file!

Learning the TSP

FIRST ROW CONTAINS values

VALUES ARE SEPARATED BY “TAB” SPACES

Page 16: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Setting the Data File: TXT File3

Save this under a new filename. Remember: 8 alphanumeric characters long and with “.txt” extension name.

Text editor values can be copied and pasted directly to TSP while spreadsheet format data needs to be placed as in-file programs. Some people find working with text editors to be far easier than spreadsheet formats.

Values from the internet are usually in ASCII characters so they can be easily used for programs like TSP, which is the plus point for ASCII encoded values.

Learning the TSP

Page 17: Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources

Ready to Run TSP Now that working data files have been prepared, what

comes next is writing a TSP batch program file. It must be noted that TSP runs on DOS and UNIX on

an interactive matrix, however batch files using TSP Windows will be illustrated here. For more experienced users please refer to the Manual.

There are two files: choose what is appropriate for you:

– TSP using spreadsheet (Lotus/Quattro/Excel) files.

– TSP using text (ASCII encoded) files

Learning the TSP

End of part1