capture log close log using cda05a-nominal-rev.log, text replace // pgm: cda05a-nominal-rev.do // task: Review 5 - Nominal Regression // project: CDA // author: your name // date: today's date * 1 setup version 10 set linesize 80 clear all macro drop _all * 2 load data use sci-review2, clear * 3 select variables and examine keep jobprst pub1 phd female sum jobprst pub1 phd female tab jobprst , m * 4 estimate multinomial logit mlogit jobprst pub1 phd female, baseoutcome(4) nolog eststo base * 5 single variable LR test quietly mlogit jobprst pub1 phd, baseoutcome(4) eststo nofemale lrtest base nofemale **or using mlogtest quietly mlogit jobprst pub1 phd female, baseoutcome(4) nolog mlogtest, lr * 6 single coefficient wald test test female **or using mlogtest mlogtest , wald * 7 test if two outcomes can be combined test [1_Adeq] **or using mlogtest mlogtest, combine * 8 testing for iia set seed 4415906 mlogtest , iia * 9 predicted probabilities prvalue, rest(mean) * 10 marginal and discrete change prchange, rest(mean) * 11 plot discrete change mlogplot pub1 phd female, std(ss0) p(.1) /// note(Job: 1=Adeq 2=Good 3=Strong 4=Distinguished) dc ntics(9) graph export cda05a-nominal-rev-fig1.emf , replace * 12 odds ratios listcoef, help * 13 plot odds ratio mlogplot pub1 phd female, std(ss0) p(.1) /// note(Job: 1=Adeq 2=Good 3=Strong 4=Distinguished) or sign ntics(9) graph export cda05a-nominal-rev-fig2.emf , replace * 14 add discrete change to odds ratio plot mlogplot pub1 phd female, std(ss0) p(.1) /// note(Job: 1=Adeq 2=Good 3=Strong 4=Distinguished) or dc sign ntics(9) graph export cda05a-nominal-rev-fig3.emf , replace * 15 close log & exit do-file log close exit