Here are some instructions for our first in-class assignment:
You can download the data from here: http://wps.aw.com/aw_stock_ie_3/178/45691/11696965.cw/ . You will find which dataset you need to download in the question tomorrow.
It is very important to set location in Stata before doing analysis. For example in the last LAB session:
clear
cd "E:\Econ 107\LAB1\data"
use cps08.dta
where "E:\Econ 107\LAB1\data" should be the correct location you save the data.
Double check to make sure that you set correct location.
If you remember, in the last LAB session, I have shown you that we can generate regression result to Microsoft Words document:
reg ahe age
outreg2 using lab1.doc, replace
replace means that the old file will be replaced when you generate new file.
Thus, to combine your results into one table, you need to add replace when you generate your first result, then delete replace to add the following results into one table. Your code should be like this ( this is not the correct answer for this assignment):
reg ahe age
outreg2 using lab1.doc, replace
reg ahe age
outreg2 using lab1.doc
reg ahe age
outreg2 using lab1.doc
Mean commandYou can calculate mean of variable via mean. For example:
mean V1 V2 V3
Also, you can use outreg2 command to generate the result into a table like regression results:
mean V1 V2 V3
outreg2 using lab1.doc