
*** Lecture 13: Logit Modeling
clear
set mem 60m
set matsize 400
use “… aaas_comb_article_3.dta"
* Here is the calculation of something we'll call the "risk allocation index"
generate c4_35_rec=(-1*c4_35_wr)+8
table c4_35_rec
generate riskindx=(c4_34_im + c4_35_rec + c4_36_ok + c4_37_ac)/4
summarize riskindx
* Here is the dose-response certainty variable (remaned):
gen DR_cert=c4_29_ce
gen GCC_cert=c4_32_ct
* let's also rename the ideology variable
gen ideology=c4_1_ide
* And the gender variable:
gen sex=c5_4_gen
* Now let's turn to the dependent variable. The radiation dose-response
* measures needs to be recoded to order the response more intuitively.
* The recode sets the quadratic to zero, then linear to 1 (all else=.).
generate DR_correct = c4_28_ra
recode DR_correct (2=0) (1=1) (3=.) (4=.)
* Check it!
tabulate DR_correct
* Now similarly recode the D-R function that is preferred for standard setting:
generate DR_standard = c4_30_pb
recode DR_standard (2=0) (1=1) (3=.) (4=.)
tabulate DR_standard if DR_correct==0
* Now we can run a simple logit model predicting the choice of quad or linear
* risk standards for those who believe the quad is the most probable dose
* response function:
logit DR_standard DR_cert ideology sex if DR_correct==0
* model fit statistics are generated using the "lstat" command: