#https://stats.oarc.ucla.edu/r/dae/logit-regression/
mylogit1 <- glm(enroll_FR_spring ~ treat+ male +minority +disadv +binary_dualcredit+SAT_TOTAL + GPA_12_GRADE +FALL_2020_INSTNAME, data = sample, family = "binomial")
summary(mylogit1)
coef_table<-(coef(mylogit1))
two_values<-coef_table[1:2]
C_LOGIT<-two_values[1]
C_EXP<-exp(C_LOGIT)/(1+exp(C_LOGIT))
C_ODDS<-C_EXP/(1-C_EXP)
C_STEP1<-log(C_ODDS)
T_LOGIT<-two_values[1]+two_values[2]
T_EXP<-exp(T_LOGIT)/(1+exp(T_LOGIT))
T_ODDS<-T_EXP/(1-T_EXP)
T_STEP1<-log(T_ODDS)
STEP2<-T_STEP1-C_STEP1
wwc_effect_size<-STEP2/1.65
odds_ratio<-T_ODDS/C_ODDS