Assignment 6: REGRESSION USING STATA
GET INTO STATA and INPUT YOUR DATA
1. Double click on the STATA icon in windows.
- At the Stata prompt, type the following:
input cost output
- Stata will then prompt you to enter data for the first "case" & you should enter the following data: (Do not use commas.)
Cost Output
0 0
1000 100
2000 200
6000 500
10000 900
11000 1000
13000 1200
15000 1300
18000 1400
19000 1500
22000 1700
24000 1900
When you have input all the above data, type the following:
end
SAVE YOUR DATA IF YOU PLAN TO FINISH LATER
- Insert a formatted disk into the floppy drive, & click on file
at the top to get the pull-down menu. Use "save as" to save your data as assign6.dta.
REGRESS YOUR DATA
- At the Stata prompt, type the following:
reg cost output
CALCULATE YHAT
- At the Stata prompt, type the following:
predict yhat
GRAPH YOUR DATA
- At the Stata prompt, type the following:
graph cost output
Try another graph:
graph cost yhat output
And another:
graph cost yhat output, c(ss)
And finally:
graph cost yhat output, c(ss) xlabel ylabel
ANALYZE YOUR RESULTS
8. What is your regression equation? (Hint: Cost = a + (b x Output)
- What is R2? How do you interpret it? (Hint: what does the number that you got for R2 mean? Check the definition in your text if you do not remember.)
- Is the independent variable significant? (Hint: use as a "rule of thumb" that t must be greater than or equal to 2 in order for the variable to be significant.)
- What is the fixed cost equal to in this regression equation?
GET OUT OF STATA
- At the Stata prompt, type:
exit, clear
E-MAIL ME ABOUT YOUR RESULTS
13. Get into Rocko, & send me an e-mail with a6 as the
subject.
14. Answer questions 8-11 above.
STATA HINTS
- You can use Page Up to go back to previous lines you typed.
Sometimes it’s easier to edit a previous line than it is to type in a new
line.
- You can get a menu of commands by typing the following at
the Stata prompt:
menu
3. If you need to edit your data file, click on editor
and make the changes.