HOMEWORK #1

Sessions in Dunning 350 will be scheduled for the second week of class. Most of the work required in this assignment can be done during one of these sessions.

Deadline: Monday, January 27, 2003.

(N.B: There is a tradeoff between providing detailed, step-by-step, instructions and making mistakes.  The more explicit the instructions, the more likely that there are typos and other errors in the assignment.  You should expect some errors below, which I will correct as soon as they are brought to my attention.)

Summary of Steps to Perform (details below)

  1. If you haven't done so already,  set up your qlink account.  Familiarize yourself with Telnet (Tera Term), FTP, and some basic Unix commands.
  2. Send an e-mail to me at ferrallc@post.queensu.ca from your qlink account with the subject "Econ 360". As soon as you do this you will start getting information about the class, so do this right away! Do not send me e-mail from some other off-campus account.
  3. Create your personal homepage on the qlink server and make a directory for this class called "econ360" under the www directory. Do not send up the homepage on some server other than qlink.
  4. Register as a user of  the Social Science Data Center Data Archive.
  5. Extract samples from the Labour Force Survey held in the QED Stata Data Archive for a birth cohort and sex of your choosing (in five-year intervals during the one month of the year of your choosing). For this group, follow the UE rate, LFP rate, and the Part-time work rate (three numbers for each year). Write a brief (one paragraph description of the pattern in the numbers).
  6. Familiarize yourself with a spreadsheet program (Excel, Quattro, Lotus, ...). Use your chosen spreadsheet program to calculate the internal rate of return and PDV for the invesment stream in the Excel file hw1data.xls.
  7. Write your results from the last two exercises in Microsoft Word, Corel Word Perfect or any word processing program that can save to PDF. Post your report in a file called either hw1.doc or hw1.pdf in your www/econ360 directory.

Details of Steps to Perform

    The following notation is used:

  1. Set up your qlink account.  Qlink is the name for a computer running the operating system Unix which is a `server' for students at Queen's.  By having an account on qlink you can send and receive e-mail and create material for the WWW.  See the Qlink homepage http://qlink.queensu.ca/   for more information and if you would like to get started on Unix there is a Unix tutorial (but the required Unix knowledge is low and is covered below).

  2.  

    If you want to use your own computer to carry out tasks for this class, it is worthwhile using  ITS Packman Software to download the free software you will need (e.g. Tera Term, WS_FTP, Netscape, Acrobat Reader).

  3. Practice the use of "telnet" and "ssh".
  4. Telnet is the protocol you use to access your account on qlink from a personal computer (either on campus or from home through a dial-up or cable internet connection).    "ssh" is short of secure shell, and is a secure way to make a telnet connection so that your qlink password cannot be stolen. The program Tera Term in Packman is used to make a telnet or ssh connection.  Telnet/ssh allows you to manage files that you store on your qlink account, including material you make available through the WWW.    See ITS Accessing Qlink

    Lab Steps:
    1. Log onto your qlink account.
    2. Start the file manager by (enter "filemgr").  Use the file manager to create a sub-directory called "test" (enter "L" then enter "mkdir test").  Highlight "test" on the screen and press "Enter".
    3. Use the Pico editor to create a file in the test sub-directory called "file1.xxx" and save the file. To do this, enter "L" and then enter "pico test/file1.xxx".  Enter a few lines of text into the file.  Then save the file and exit (press "Ctrl o Enter" then press "Ctrl x").
    4. Use the file manager to rename "file1.xxx" to "file2.yyy" (highlight "file1.xxx" on the screen, enter "R" and then enter "file2.yyy").
    5. Send an e-mail message to yourself using Pine (or to the person next to you in the lab). NEW: You don't have to use Pine. You can use web-based qlink e-mail.
    6. Read the message using Pine.
    7. Send an e-mail to me at ferrallc@post.queensu.ca from your qlink account with the subject "Econ 360".
  5. Practice the use of "ftp" (WS_ftp) FTP stands for "File Transfer Protocol".  Although Telnet allows you to create and modify files and information on Qlink, it does not allow you to move files between qlink and PCs.  For this purpose it is necessary to use ftp.  For a brief introduction to FTP, see the ITS FTP Tutorial.

    Lab Steps

    1. Start WS_FTP and connect to your qlink account.
    2. Press "ASCII"  button to use ASCII transfer mode.
    3. Select "test" in the Remote System window.
    4. Highlight "file1.yyy"  and press "<--" button(download).
    5. Highlight "file1.yyy" in the Local System window and press "Rename" button, then enter  "file2.yyy".
    6. Highlight "file2.yyy"  in the Local System and press "-->" button(upload).
    7. Press "Refresh" button in the Remote System window.
    8. Rename "file2.yyy" to "file3.yyy" in the Remote System.
    9. Press "Binary"  button to use Binary transfer mode.
    10. Highlight "file3.yyy"  and press "<--" button (download).
    11. Highlight "file2.yyy" and press "View" button in the Local System.
    12. Highlight "file3.yyy" and press "View" button in the Local System.
    13. Switch to your Tera Term session and compare the size of the two files "file1.yyy" and "file2.yyy" using filemgr.

    14.  
  6. Create your personal WWW homepage on the qlink server and make a directory for this class.  For a general overview of the WWW, see ITS HTML Tutorial.  For the mkwww command, see  mkwww in the HTML Tutorial.

  7. Lab Steps
    1. Inside filemgr, press "L" and then enter "mkwww". Or, at the "====> " prompt, simply enter "mkwww".
    2. Inside filemgr, highlight "www" and press "Enter".  You should see one file there, called "index.html". Highlight "index.html" and enter "V" to view its contents.  Enter "Q" to quit and return to filemgr.
    3. Switch to your WWW browser (Netscape or Explorer).  In the address or location window, enter "http://qlink.queensu.ca/~<your account>" where <your account> is your qlink i.d. (like 1cf0).  What you should see is the generic homepage created by the mkwww command and placed in index.html.
    4. Inside filemgr and viewing the www directory, make a subdirectory called econ360 (enter "L" and then enter "mkdir www/econ360" or enter the "mkdir www/econ360" command directly).
    5. Switch your WWW browser and modify the location/address to "http://qlink.queensu.ca/~<your account>/econ360".  You should see "Forbidden You don't have permission to access /~<your account>/econ360 on this server."
    6. Back in filemgr press "L" and enter "pico www/econ360/index.html".  Enter "This is a first draft of my Econ 360 Homepage."  Press "Ctrl o Enter" and then press "Ctrl x".
    7. Then press "L" and enter "publish".  See publish in the HTML Tutorial.
    8. Switch back to your browser and re-load the econ360 directory.
    9. Use your browser to "View Information" on the file.  Note that it is possible to see the day and time the file was last modified.  We use this feature to check that you complete assignments on time.
  8. NEW: This register link sent you to the "old" registration form. It now is correct. Register for access to the Documents Library data page. You will be sent a password by e-mail.
  9. Once you receive the DLI password by e-mail register as user of the QED Data Archive. Inside Stata, enter "Qregstr" and press "enter".
  10. Extract samples from the Labour Force Survey in the QED Data Archive for several years. Select a single cohort of people (sex and birth year group) and follow them through several age brackets. Report the cohort's UER, LFP, and part-time rate ER, and average weekly wage of working people in those years. Write a brief one paragraph summary of the results.
    Lab Steps:
    1. Browse to http://edith.econ.queensu.ca/data
    2. Find the data set numbers for the five or six years (1976 to 1998) and the month of the LFS of your choice.
    3. Start "Stata" in Dunning 350 or MC B405.
    4. Extract the variables:
      Qextract sex age_12 lfsstat ftptmain fweight, ds(??) exec
      NEW: where you replace "??" with the DataSet number for the LFS year and month. You find the data set number in the archive when you get to the "Sample Index" page. For example, the January 1977 LFS is data set #99, which you see if you go to its index page.
    5. Keep only the demographic group you want:
      keep if sex==?? & age_12==??
      NEW: where you replace "??" with the numerical code for the sex and age group you wish to report statistics for that year. You can get the numerical code by looking at the "codebook" for the variable:
      . codebook age_12 , t(20)
      age_12 -------------------------------------- five-year age group of respondent
                        type:  numeric (float)
                       label:  age_12
      
                       range:  [1,12]                       units:  1
               unique values:  12                   coded missing:  0 / 95194
      
                  tabulation:  Freq.   Numeric  Label
                               13644         1  15 to 19
                               11724         2  20 to 24
                               11023         3  25 to 29
                                8922         4  30 to 34
                                7576         5  35 to 39
                                7133         6  40 to 44
                                6857         7  45 to 49
                                6679         8  50 to 54
                                5684         9  55 to 59
                                4886        10  60 to 64
                                4189        11  65 to 69
                                6877        12  70+
      
      From this output we see that the age group "30 to 34" has a numerical code of 4, which is the value you would use in the keep command.
    6. Do a weighted tabulation of the variables:
      tab1 lfsstat ftptmain [fw=fweight]
      The variable fweight is the number of Canadians.
    7. Calculate the UE rate, the LFP rate, and the Part-time work rate from the output. NEW: The definitions of these concepts are given in the pages of the reserved textbooks, in the pages indicated in the course outline."
    8. Repeat the steps for the same cohort (different value of age_12) for as many years as available. Note: there are problems with the LFS data in the archive for years 1999 and 2000. Stop at 1998 or before. For example, if you report statistics for the age group 30 to 34 in 1977, then you should report statistics for the age group 35 to 39 in 1982. In this way you will be tracing out the labour market experiences of a group of Canadians born in the same five year period over the careers. In this example, it would be the birth cohort 1947 to 1952. Note: to run Qextract on another data set you have to type clear to remove the data still left from the previous extraction..
    9. Create a table with the values you have computed and write a brief paragraph describing the results.
    Here is an example log file.
  11. Use a spreadsheet program to calculate the internal rate of return for an investment stream in the file below. Create a graph or table showing the PDV of the investment as a function of the interest rate or discount rate.

  12. Lab Steps
    1. Familiarize yourself with a spreadsheet program (Excel, Quattro, Lotus, ...).  Excel is supported by ITS, and there is an online Excel tutorial. You should understand Parts 1-3 of that tutorial (whether in Excel or the other spreadsheets).
    2. Download the following file and load it into your chosen spreadsheet program (each spreadsheet program should be able to read this file):

    3. [Excel File: hw1data.xls]
      You can view the data as an HTML file:
      [HTML File: hw1data.htm]
    4. Enter the month of birth for you or a team member in the red cell.
    5. Make a new column of values in the spreadsheet that equals the net income flow for each period (benefits minus costs). Create a graph or table showing the PDV of the net income flow as a function of the interest rate or discount rate. Do this by finding the Excel function that computes PDV (or maybe called just PV) for a column of numbers and given interest rate. Use a number of different interest rates between 0 and, say, .25.
    6. Use the Help facility in the spreadsheet program to find the function that computes Internal Rates of Return. Use it to calculate the IRR for the net income flow.
    7. Use the Help facility to learn how to read in formatted text files into a spreadsheet. Then download and read in file hw1.txt into a spreadsheet. Find a function that calculates the sum of column or block of cells in the spreadsheet. Using that command, calculate the sum of the numbers in the column labelled "benefit".
    8. Write a report which includes your results from the LFS data, the IRR/PDV exercise, and the reading data exercise (column sum). Post your results to your www/econ360 directory. Make sure it is called either "hw1.pdf" or "hw1.doc".

    If you use another internet provider, make sure you forward your mail from qlink to the other account (see miscellaneous topics).

Miscellaneous Topics