Presentation is loading. Please wait.

Presentation is loading. Please wait.

Learning the TSP2: a guide for students at the 国際総合学類筑波大学 RUNNING REGRESSIONS FROM A SPREADSHEET FILE If you are using a network browser to view this program,

Similar presentations


Presentation on theme: "Learning the TSP2: a guide for students at the 国際総合学類筑波大学 RUNNING REGRESSIONS FROM A SPREADSHEET FILE If you are using a network browser to view this program,"— Presentation transcript:

1 Learning the TSP2: a guide for students at the 国際総合学類筑波大学 RUNNING REGRESSIONS FROM A SPREADSHEET FILE 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”. 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”.

2 Learning the TSP2: running regressions from a spreadsheet file Check Points: Check Points: - Do you have your data file with you? This file is “ saved as ” Excel version 4/Lotus worksheet v.3 or less. The filename must end with *.wks and/or *.xls - Did you make this data file a working file format? First row contains variable names of 8 alphanumeric characters. Unnecessary information has been deleted from the worksheet. Rows and columns contains numerical data. Blank columns and rows in between have been deleted. Missing values or no data columns have periods ( “. ” ). - Do you remember what your variable names mean? Variables are all numbers for categories or amounts. Creating a variable list would be helpful if regressions will be of more than three variables. - Can you log on to the terminals at the College? TSP is a copyrighted software, it cannot be copied on to your PCs. Our college has a site license.

3 Learning the TSP2: running regressions from a spreadsheet file  Go to “Start”, then to “Programs”, choose TSP45, click “tlg” or TSPWin.  The following will appear.  Click “cancel” ( キャンセール) Begin Running TSP “ cancel ”

4 Learning the TSP2: running regressions from a spreadsheet file 1 Begin Running TSP  When you click “ cancel ” the backbone of the TSP Program will appear.  Command Buttons will be on top.  Click on the second button from the left: “ New Input File ”. Open file Print re-doText cut copy paste colour scheme place Save file Undo TextRUN PROGRAM

5 Begin Running TSP  When you click “New Input File” the following will appear.  The one to your left is called the input file; the one on the right is the output file. The former is your workspace – where you type in a tsp program. The latter is where the results will be shown when you run your program. Learning the TSP2: running regressions from a spreadsheet file 2 Input Space Output Space

6 Begin Running TSP  USING SPREADSHEET FILES  Here we use a data file called “ TreasuryBill-US.xls ”, which is changed to the working file imaginatively named “ tbill-us.xls ” (saved as Excel v4) Learning the TSP2: running regressions from a spreadsheet file 3 TreasuryBill-US.xls will be used to present tables tbill-us.xls will be used as a working file for regressions

7 Begin Running TSP  WRITING OUT THE PROGRAM  The first two lines sets TSP to use (1) this much memory; and (2) not to bother to write out warnings. These may be safely ignored in small samples.  “smpl” means the sample size. Since the data is yearly data, the beginning value is the beginning year and the ending value is the last year. For numerical data, say n=25 observations, the appropriate entry would be: “smpl 1 25;”  ALL STATEMENTS IN TSP MUST END IN A SEMI-COLON (;). Please take note, otherwise your program will run into error.  The next line tells the gradient of each observation. “freq a” tells TSP it is a time-series yearly data, and “freq n” for normal samples.  These two lines loads the working file for use. This is the exact format to use. Learning the TSP2: running regressions from a spreadsheet file 4

8 Begin Running TSP  ENDING THE PROGRAM  The last two lines ends TSP. This have to be typed in.  This is the exact format to use.  In the middle, the specifications or body of the program is typed in. This will be discussed later. Learning the TSP2: running regressions from a spreadsheet file 5

9 Begin Running TSP  SAVING THE FILE  Save the file IN THE DIRECTORY WHERE THE WORKING FILE IS SAVED. For instance, this tsp program is named “tbill-us.tsp”. This is saved in where the working file “tbill-us.xls” is.  When you type in the filename, PLEASE COMPLETE BY TYPING IN “.tsp” [period, t s p] Learning the TSP2: running regressions from a spreadsheet file 6 Working file tbill-us.tsp

10 Begin Running TSP  PROGRAM PROPER  “ MSD [varname]; ” is the command to get the averages and standard deviation values for the sample.  “ msd(CORR) [varname]; ” and msd(COVA) [varname]; ” are the respective commands to get correlations and covariance coefficients. Learning the TSP2: running regressions from a spreadsheet file 7

11 Begin Running TSP  PROGRAM PROPER  To graph the relationship between two variables: “ plot [var1] [var2]; ”  To produce scatter plots: “ graph [var1] [var2}; ”  To get the histogram of a discrete variableX: “ hist X; ”  REMEMBER TO SAVE FILE FIRST! Click “ Save ” button then click TSP button. Learning the TSP2: running regressions from a spreadsheet file 8 Click TSP button to run regressions

12 Begin Running TSP  RESULTS  Mean & Standard Deviation  Correlation Coefficients  Covariance Coefficients Learning the TSP2: running regressions from a spreadsheet file 9

13 Begin Running TSP  RESULTS  PLOT y by x  GRAPH y by x  HISTogram of X Learning the TSP2: running regressions from a spreadsheet file 10

14 Begin Running TSP  TRANSFORMING VARIABLES  “ genr ” is used to generate new variables by applying mathematical operations on existing variables.  Example: T-Bill Rates are in percentages, to express them as decimals, the following is specified.  genr [new varname] = [operation] ;  genr tbill=TB/100 ;  CREATING NEW VARIABLES  “ select ” is used to choose the conditional variable, and then a new variable is created when that condition is satisfied.  Example: 1972-1973 are oil shock years, and “ dummy ” variables are need to mark these.  Select [varname]=, condition; [new varname]=X; select 1;  Select year>1971 & year<1974; oildum=1; select 1; Learning the TSP2: running regressions from a spreadsheet file 11 REMEMBER TO SAVE FILE FIRST! Click “ Save ” button then click TSP button.

15 Begin Running TSP  RESULTS FOR TRANSFORMING VARIABLES  RESULTS FOR CREATING NEW VARIABLES Learning the TSP2: running regressions from a spreadsheet file 12

16 Begin Running TSP  SIMPLE LINEAR REGRESSION  “ OLSQ [dep var] c [var1] [var2]; ” is the command to regress dependent variable by some independent variable. Learning the TSP2: running regressions from a spreadsheet file 13 Results of the regression run. REMEMBER TO SAVE FILE FIRST! Click “ Save ” button then click TSP button.

17 Begin Running TSP  ENDING TSP SESSION  Be sure to save BOTH files, input and output files!  Close TSP windows.  The example used here can be downloaded from the homepage. Learning the TSP2: running regressions from a spreadsheet file 14


Download ppt "Learning the TSP2: a guide for students at the 国際総合学類筑波大学 RUNNING REGRESSIONS FROM A SPREADSHEET FILE If you are using a network browser to view this program,"

Similar presentations


Ads by Google