// Task 1 routine setup capture log close set more off estimates clear log using cda05b-ex5.log, replace text version 9.2 set scheme s2mono // pgm: cda05b-ex5.do // task: 5 - Testing and Assessing Fit - Excercise // project: CDA Lab Guide // author: your name // date: today's date use sci-review, clear // Task 2: keep stjob, female, enrol, and phd. Explore and drop missing. // Step 2.1 keep the four variables and explore. // Step 2.2 drop missing cases // Step 2.3 verify the last step // Task 3: Test that being female does not affect stjob in full model. // Task 3a: estimate full model and use z-statistics /* Type your answer here */ // Task 3b: use test to test the effect of being female. /* Type your answer here */ // Task 3c: test the same hypothesis using an LR test // Task 4: Test that the effects of female and enroll are simultaneously // equal to zero using a Wald test and an LR test. // Task 4a: the wald test // Task 4b: the LR test // Task 4c: compare the estiamtes // Task 5: Test that the effect of enroll equals that of phd. // Step 5.1: estimate full model and use test. /* Type your answer here */ // Task 6: Use fitstat to compare the full model with the // model with female and the model without female or enrol. // Step 6.1 run a logit regression of stjob on female, enrol, and phd // and use fitstat, saving the results. // Step 6.2 run a second logit regression of stjob on enrol and phd; // use fitstat with saving() and using() to compare models. // Step 6.3 run a third logit regression of stjob on female and compare. // Task 7: Use methods of outlier detection to examine weaknesses in // your model. log close exit