16
Microeconomics Report: Using 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”.

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

  • Upload
    keelia

  • View
    23

  • Download
    0

Embed Size (px)

DESCRIPTION

Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学. - PowerPoint PPT Presentation

Citation preview

Page 1: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using the TSPa 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”.

Page 2: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

Checkpoints:- You have access to a computer terminal at the College and hav

e at least ONCE opened the TSP- You know how to run a simple TSP program for an Ordinary Lea

st Squares (OLSQ) regression- You know either how to use NotePad, EmEditor, or TeraPad or

any other Text-File Editor.- You have chosen your sample data: you know what the depend

ent and independent variables are- You have saved your files in a usable disk.- IF YOU ARE UNABLE TO PUT A CHECK FOR YOURSELF FO

R ANY OF THE ABOVE POINTS, GO BACK AND REVIEW “LEARNING THE TSP1” AND “LEARNING THE TSP2”

Page 3: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

PREPARING SAMPLE DATABy now, you should have already downloa

ded the file Micro1.xls from the homepage, which looks like

The FIRST LINE is the VARIABLE name. What do these mean?

To get an idea what the Variable name stands for download microvar.txt from the homepage.

Action:- Choose the variables you want.

What is you dependent variable?What are the variables representing your objective constraint?What are the variables representing your subjective constraint?

- Next, select the columns of the corresponding variables you have picked and paste them to a new file.

Page 4: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

Highlight the columns of the variables you have picked.

Paste these columns on to a new worksheet.

Page 5: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

You have just created a sample data. Your new worksheet should now look like this: (SAVE please)

Observation NumberQuantity of Tomatoes

Price of Tomatoes

Page 6: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

Save the Excel File as version4 c.f. LearningTSP1

Note that in the trial runs for this program, somehow TSP is unable to read the newer Excel versions. If you are able to run Excel versions with TSP, please proceed like that.

The next part will discuss how to use a text editor to create the sample data for use with TSP.

Page 7: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

Note first how many observations you have. This is your sample number.

Select the entire worksheet where you have created your sample data.

Paste this on to a text editor file. In these examples I will use EmEditor but you may use either TeraPad or NotePad

Save this text file “micro1.txt”

Page 8: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

Preparing text file sample dataFirst, cut the variable name. Remember that it will be hard to retype or even remember the variable name, so it is better to select and cut.

( 切り取り)

Paste this line to a new file or anywhere you can retrieve it from for later use.

THIS IS HANDY FOR TSP.

Page 9: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

It should now look like this. Save. Mind how many observations you have.

Here, I have pasted the variable name line on a blank text file to be used later

Make sure:The first line is the first observation.All data are numbers.Saved the file.

Page 10: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

The TSP program file. For this exercise, I will use the entire data sample in a

text file, I have named imaginatively “test2.txt”. This contains 50 observations. The data set made available may contain MORE.

I have chosen my dependent variable to be the quantity of coffee bought. The rest of the independent variables will be listed.

Note we will learn how to (1) make a dummy variable, and (2) how to restrict your sample set.

Page 11: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

DO YOU HAVE YOUR FLOPPY DISK WHICH CONTAINS YOUR DATA? Then proceed.

TSP Program You can see that if I had not cut & save the variable

names, I would take a long time to retype all the variable names. So be sure you know where your files are!

- This set begins with the memory option and freq n;

smpl 1 50; to denote the number of observations- Loading the Variables(text) load(file=‘a:\test2.txt’) varnames; OR(xls) load(file=‘a:\test2.xls’) varnames;

Step 1Load the variables

Page 12: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

TSP Program Creating the Dummy Variable A dummy variable has only two values: 1

or zero.

The TSP command is:

select variablename=value; varname2=0; select 1;

- for example, a2 has values 1=male and 2=female, to change into a dummy:

select a2=2; a2=0; select 1;

means, “choose all a2=2 and change to a2=0, do so for entire sample;”

- Now a2 has only two values: 1 and zero.- In this exercise, you must realize by now

why A6 and A7 are inherently dummy variables. (Why?)

Renaming Variables

The TSP Command is:

rename varname newvarname;

The new variable name must be 16 roman alphabet or numbers and NO SPACE within the name! No special characters allowed!

CREATE YOUR OWN VARIABLE NAME!

Page 13: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

TSP Program Getting the Basic Statistics The TSP command is:

msd varname1 varname2;- The msd command will give you the mea

n, standard deviation, minimum and maximum values.

Restricting the sample- The TSP command is:

smplif varname<,>,=value;- Restrictions are OPTIONAL. You can run

regressions on entire sample OR for only a part of the sample. In the example, I have restricted the sample to only the female population to see the demand of coffee by females.

Running Ordinary Least Squares- The TSP command is:

olsq depvarname c indepvar1,..n;

Page 14: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

TSP Program The Results Basic Statistics Ordinary Least Squares

Be sure to save the Input and Output Files!

Now create tables for both the Basic Statistics and the Regression Results. Having at most 4 decimal places would be desirable.

Page 15: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

Reporting your results in table formats:

Page 16: Microeconomics Report: Using the TSP a guide for students at the 国際総合学類筑波大学

Microeconomics Report: Using TSP

Based on these results, you should now be able to analyze the demand for coffee in the class. Write out your report and append a copy of the program (printout of output file

only) to your report. The sample files indicated in this simple tut

orial is available in the homepage, even the TSP program used.

お疲れ様でした。 良い年末ように