The textbook data are available here.
Assignment test0: basics of Stata, summarizing the data. Assignment text and John Doe's example, preliminary results.
Assignment test1: statistical distributions in Stata. Assignment text and John Doe's example, preliminary results.
Assignment test2: confidence intervals and hypothesis testing. Assignment text and John Doe's example, preliminary results.
Assignment test3: ANOVA. Assignment text and John Doe's example, preliminary results.
Assignment midterm1: The first midterm, Stata component. Assignment text (no John Doe's example), preliminary results, backbone do-file.
Assignment test4: regression. Assignment text and John Doe's do-file, preliminary results.
Assignment midterm2: The second midterm, Stata component. Assignment text (no John Doe's example), preliminary results.
Assignment test5: Multiple regression. Assignment text and John Doe's example, preliminary results.
Assignment test6: Multiple regression and diagnostics. Assignment text and John Doe's example, preliminary results.
Assignment midterm3: The second midterm, Stata component. Assignment text, first attempt results.
One possible way is to postclose your current file, and start everything over again. Make sure you have specified replace option in the post command, then. You can click on the commands in the Command window to quickly recall and repeat them.
Another way is to continue and finish your file, and then edit it. Suppose in test0 assignment, John Doe entered question 3 twice (and made an error the first time), so that his resulting file looks like this:
. list
+-------------------+
| Question Answer |
|-------------------|
1. | 1 15 |
2. | 2 12 |
3. | 3 0 |
4. | 3 .004 |
5. | 4 2.574 |
|-------------------|
6. | 5 .853 |
+-------------------+
.
|
. drop in 3
(1 observation deleted)
. list
+-------------------+
| Question Answer |
|-------------------|
1. | 1 15 |
2. | 2 12 |
3. | 3 .004 |
4. | 4 2.574 |
5. | 5 .853 |
+-------------------+
.
|
. save answers-test0-99999.dta, replace file answers-test0-99999.dta saved . |
See FAQ1. You can just type the correct answer, and edit the resulting file.
3. I skipped a question! Do I need to start over again?
No, the order of questions does not matter. You can add whatever you've missed at any time, just make sure you don't have it doubled. (See FAQ #1 about what to do about it.) If you want to, you can sort your data later.
Suppose John Doe answered some questions on test0 out of order, so his final file looks like this:
. list
+-------------------+
| Question Answer |
|-------------------|
1. | 1 15 |
2. | 2 12 |
3. | 4 2.574 |
4. | 5 .853 |
5. | 3 .004 |
+-------------------+
.
|
. sort Question
. list
+-------------------+
| Question Answer |
|-------------------|
1. | 1 15 |
2. | 2 12 |
3. | 3 .004 |
4. | 4 2.574 |
5. | 5 .853 |
+-------------------+
. save answers-test0-99999.dta, replace
file answers-test0-99999.dta saved
.
|
Note that in general the order of observations might be important. However the grading engine of Stata takes care of it automatically.
. use take1, clear . merge Question using take2.dta , sort update . tab _merge . list if _merge != 3 . |
clear input Question Answer end save answers-midterm3-######
use answers-midterm3-######, clear list , clean noobs noheaderThis will produce a listing with the values only.