read in data, center variables, create “stayed with default?” variable recoding other variables too

check % of people who chose SS in each condition - 1 is SS, 2 is LL, 3 is No Default the control condition falls in the middle of the other 2 default conditions

prop.test(table(all$cond, all$SS))
## 
##  3-sample test for equality of proportions without continuity
##  correction
## 
## data:  table(all$cond, all$SS)
## X-squared = 13.693, df = 2, p-value = 0.001063
## alternative hypothesis: two.sided
## sample estimates:
##    prop 1    prop 2    prop 3 
## 0.5961003 0.5172414 0.4598930

but the control condition is not significantly different from LL, only from SS

SScontrol<-subset(all, cond!="LL")
SScontrol<-droplevels(SScontrol)
prop.test(table(SScontrol$cond, SScontrol$SS))
## 
##  2-sample test for equality of proportions with continuity
##  correction
## 
## data:  table(SScontrol$cond, SScontrol$SS)
## X-squared = 1.8014, df = 1, p-value = 0.1795
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.02481233  0.13950899
## sample estimates:
##    prop 1    prop 2 
## 0.5172414 0.4598930
LLcontrol<-subset(all, cond!="SS")
LLcontrol<-droplevels(LLcontrol)
prop.test(table(LLcontrol$cond, LLcontrol$SS))
## 
##  2-sample test for equality of proportions with continuity
##  correction
## 
## data:  table(LLcontrol$cond, LLcontrol$SS)
## X-squared = 3.506, df = 1, p-value = 0.06115
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.003515819  0.161233618
## sample estimates:
##    prop 1    prop 2 
## 0.5961003 0.5172414
nocontrol<-subset(all, cond !="no")
nocontrol<-droplevels(nocontrol)
prop.test(table(nocontrol$cond, nocontrol$SS))
## 
##  2-sample test for equality of proportions with continuity
##  correction
## 
## data:  table(nocontrol$cond, nocontrol$SS)
## X-squared = 13.091, df = 1, p-value = 0.0002967
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  0.0618704 0.2105441
## sample estimates:
##    prop 1    prop 2 
## 0.5961003 0.4598930

I think it’s easiest to understand how preferences (delta) interact with default condition if we break it down into first looking at SS default vs. no default, and then LL default vs. no default. We can look at all 3 together after.

First, SS vs. no default shows that setting the default as SS only has an effect for people above delta=.0053, i.e. people with relatively high discount rates for whom the SS option is the “preference consistent” option

summary(glm(SS ~ cond * delta, data=SScontrol, family="binomial"))
## 
## Call:
## glm(formula = SS ~ cond * delta, family = "binomial", data = SScontrol)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2425  -1.0426   0.3399   1.1756   1.6100  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   -1.2192     0.3294  -3.701 0.000215 ***
## condSS        -1.1819     0.4848  -2.438 0.014765 *  
## delta        205.8774    55.1224   3.735 0.000188 ***
## condSS:delta 268.5291    85.7616   3.131 0.001741 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 879.60  on 634  degrees of freedom
## Residual deviance: 788.19  on 631  degrees of freedom
## AIC: 796.19
## 
## Number of Fisher Scoring iterations: 4
f1<-(glm(SS~cond*delta, data=SScontrol, family="binomial"))
library(visreg)
col<-c("black", "blue")
col2<-c("gray80", "cornflowerblue")
col3<-adjustcolor(col2, alpha=.7)
visreg(f1, "delta", by="cond", line=list(col=col), fill=list(col=col3), overlay=TRUE, partial=FALSE,  scale="response", xlab="discount rate", ylab="P (choosing SS)")

Similarly, for LL+control conditions only, condition only has an effect for delta<= .0056. In other words, setting the LL as default only has an effect for people who are relatively patient - those for whom the LL option is preference consistent

summary(glm(SS~cond*delta, data=LLcontrol,family="binomial"))
## 
## Call:
## glm(formula = SS ~ cond * delta, family = "binomial", data = LLcontrol)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.1495  -0.9882  -0.6989   1.0977   2.1427  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)    -2.6868     0.3229  -8.321  < 2e-16 ***
## condno          1.4677     0.4613   3.182  0.00146 ** 
## delta         392.7345    51.7727   7.586 3.31e-14 ***
## condno:delta -186.8571    75.6234  -2.471  0.01348 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 849.66  on 619  degrees of freedom
## Residual deviance: 757.91  on 616  degrees of freedom
## AIC: 765.91
## 
## Number of Fisher Scoring iterations: 4
f2<-(glm(SS~cond*delta, data=LLcontrol,family="binomial"))
col<-c("red", "black")
col2<-c("indianred1" , "gray80")
col3<-adjustcolor(col2, alpha=.45)
visreg(f2, "delta", by="cond", line=list(col=col), fill=list(col=col3), overlay=TRUE, partial=FALSE,  xlab="discount rate", scale="response", ylab="P (choosing SS)")

I think this discrete analysis is most straightforward and the most direct test of our theory:

patient people who saw the LL default and impatient people who saw the SS default saw a default that was consistent with their preferences. these people were much more likely to choose the default option than people who saw a default that was inconsistent with their preferences.

patient and impatient here is defined as 1st and 3rd quartiles

summary(all$delta)
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## 0.001147 0.003774 0.004619 0.005677 0.007121 0.013230
all$consistent[(all$deltac<=0.003775 & all$cond=="SS") | (all$deltac>=0.007145 & all$cond=="LL")]<-1
all$consistent[(all$deltac<=0.003775 & all$cond=="LL") | (all$deltac>=0.007145 & all$cond=="SS")]<-0
prop.test(table(all$stay, all$consistent))
## 
##  2-sample test for equality of proportions with continuity
##  correction
## 
## data:  table(all$stay, all$consistent)
## X-squared = 12.99, df = 1, p-value = 0.0003132
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.22499232 -0.06591677
## sample estimates:
##    prop 1    prop 2 
## 0.4000000 0.5454545

confirming that the default only exists for people in the middle range of patience

summary(glm(SS~deltac*cond, data=nocontrol, family=binomial))
## 
## Call:
## glm(formula = SS ~ deltac * cond, family = binomial, data = nocontrol)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2425  -0.9035  -0.6555   1.0435   2.1427  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)    -0.4573     0.1200  -3.811 0.000138 ***
## deltac        392.7345    51.7727   7.586 3.31e-14 ***
## condSS          0.7494     0.1698   4.414 1.01e-05 ***
## deltac:condSS  81.6720    83.6480   0.976 0.328877    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1014.08  on 732  degrees of freedom
## Residual deviance:  853.78  on 729  degrees of freedom
## AIC: 861.78
## 
## Number of Fisher Scoring iterations: 4
summary(all$deltac)
##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## -0.004530 -0.001903 -0.001058  0.000000  0.001445  0.007551
patient<-subset(nocontrol, deltac <= -0.001924)
impatient<-subset(nocontrol, deltac  >= 0.001446)
middle<-subset(nocontrol, nocontrol$deltac > -0.001924 & nocontrol$deltac < 0.001446)
prop.test(table(patient$SS, patient$cond))
## 
##  2-sample test for equality of proportions with continuity
##  correction
## 
## data:  table(patient$SS, patient$cond)
## X-squared = 0.0010801, df = 1, p-value = 0.9738
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.1953572  0.2431733
## sample estimates:
##    prop 1    prop 2 
## 0.5066667 0.4827586
prop.test(table(impatient$SS, impatient$cond))
## 
##  2-sample test for equality of proportions with continuity
##  correction
## 
## data:  table(impatient$SS, impatient$cond)
## X-squared = 0.8518, df = 1, p-value = 0.356
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.08835742  0.27892589
## sample estimates:
##    prop 1    prop 2 
## 0.5813953 0.4861111
prop.test(table(middle$SS, middle$cond))
## 
##  2-sample test for equality of proportions with continuity
##  correction
## 
## data:  table(middle$SS, middle$cond)
## X-squared = 19.322, df = 1, p-value = 1.104e-05
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  0.1301713 0.3396637
## sample estimates:
##    prop 1    prop 2 
## 0.5854922 0.3505747

let’s look at reactance! it seems to increase as people’s preferences become less consistent with the default they see

nocontrol<-subset(all, cond!="no")
r<-(glm(statereactance ~ delta*cond, data=nocontrol))
visreg(r, "delta", by="cond", overlay=TRUE, partial=FALSE, ylab="reactance")

and it seems to at least partially mediate:

summary(glm(statereactance ~ cond*delta, data=nocontrol))
## 
## Call:
## glm(formula = statereactance ~ cond * delta, data = nocontrol)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -5.2690  -1.4290  -0.3931   1.3556   9.9139  
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     6.9146     0.3269  21.153   <2e-16 ***
## condSS          1.2376     0.4752   2.604   0.0094 ** 
## delta         110.9106    51.7566   2.143   0.0324 *  
## condSS:delta -212.0196    76.7833  -2.761   0.0059 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 6.362394)
## 
##     Null deviance: 4687.8  on 732  degrees of freedom
## Residual deviance: 4638.2  on 729  degrees of freedom
## AIC: 3442.5
## 
## Number of Fisher Scoring iterations: 2
summary(glm(stay ~ statereactance, data=nocontrol, family=binomial))
## 
## Call:
## glm(formula = stay ~ statereactance, family = binomial, data = nocontrol)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.5450  -1.2740   0.9395   1.0345   1.5621  
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## (Intercept)     1.19712    0.24405   4.905 9.33e-07 ***
## statereactance -0.12161    0.03039  -4.001 6.30e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1002.74  on 732  degrees of freedom
## Residual deviance:  986.17  on 731  degrees of freedom
## AIC: 990.17
## 
## Number of Fisher Scoring iterations: 4
summary(glm(stay ~ cond*delta, data=nocontrol, family=binomial))
## 
## Call:
## glm(formula = stay ~ cond * delta, family = binomial, data = nocontrol)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2425  -0.9609   0.5854   0.8355   2.1495  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)     2.6868     0.3229   8.321  < 2e-16 ***
## condSS         -5.0879     0.4803 -10.592  < 2e-16 ***
## delta        -392.7345    51.7727  -7.586 3.31e-14 ***
## condSS:delta  867.1409    83.6480  10.367  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1002.74  on 732  degrees of freedom
## Residual deviance:  853.78  on 729  degrees of freedom
## AIC: 861.78
## 
## Number of Fisher Scoring iterations: 4
summary(glm(stay ~ statereactance + cond*delta, data=nocontrol, family=binomial))
## 
## Call:
## glm(formula = stay ~ statereactance + cond * delta, family = binomial, 
##     data = nocontrol)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.3087  -0.9548   0.5477   0.8779   2.2407  
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       3.48065    0.41612   8.365  < 2e-16 ***
## statereactance   -0.10866    0.03382  -3.213  0.00131 ** 
## condSS           -5.04861    0.48512 -10.407  < 2e-16 ***
## delta          -386.89805   52.05515  -7.432 1.07e-13 ***
## condSS:delta    860.36668   84.43757  10.189  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1002.74  on 732  degrees of freedom
## Residual deviance:  843.25  on 728  degrees of freedom
## AIC: 853.25
## 
## Number of Fisher Scoring iterations: 4

at least in the LL condition

LL<-subset(all, cond=="LL")
summary(glm(statereactance ~ delta, data=LL))
## 
## Call:
## glm(formula = statereactance ~ delta, data = LL)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -5.2690  -1.4191  -0.3571   1.5707   7.6431  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   6.9146     0.3256  21.237   <2e-16 ***
## delta       110.9106    51.5523   2.151   0.0321 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 6.312252)
## 
##     Null deviance: 2282.7  on 358  degrees of freedom
## Residual deviance: 2253.5  on 357  degrees of freedom
## AIC: 1684.2
## 
## Number of Fisher Scoring iterations: 2
summary(glm(SS ~ delta, data= LL))
## 
## Call:
## glm(formula = SS ~ delta, data = LL)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.9646  -0.2994  -0.2193   0.3620   0.9734  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.07957    0.05728  -1.389    0.166    
## delta       83.81771    9.06960   9.242   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.1953732)
## 
##     Null deviance: 86.435  on 358  degrees of freedom
## Residual deviance: 69.748  on 357  degrees of freedom
## AIC: 436.6
## 
## Number of Fisher Scoring iterations: 2
summary(glm(SS ~ statereactance, data=LL))
## 
## Call:
## glm(formula = SS ~ statereactance, data = LL)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.5485  -0.3892  -0.3361   0.5577   0.7170  
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)   
## (Intercept)     0.20327    0.08125   2.502  0.01281 * 
## statereactance  0.02656    0.01020   2.603  0.00962 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.2376036)
## 
##     Null deviance: 86.435  on 358  degrees of freedom
## Residual deviance: 84.824  on 357  degrees of freedom
## AIC: 506.85
## 
## Number of Fisher Scoring iterations: 2
summary(glm(SS ~ statereactance + delta, data=LL))
## 
## Call:
## glm(formula = SS ~ statereactance + delta, data = LL)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.9937  -0.2983  -0.1957   0.3864   0.9402  
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    -0.19784    0.08589  -2.304   0.0218 *  
## statereactance  0.01710    0.00928   1.843   0.0661 .  
## delta          81.92066    9.09772   9.005   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.1940702)
## 
##     Null deviance: 86.435  on 358  degrees of freedom
## Residual deviance: 69.089  on 356  degrees of freedom
## AIC: 435.19
## 
## Number of Fisher Scoring iterations: 2

not in SS

SS<-subset(all, cond=="SS")
summary(glm(statereactance ~ delta, data=SS))
## 
## Call:
## glm(formula = statereactance ~ delta, data = SS)
## 
## Deviance Residuals: 
##    Min      1Q  Median      3Q     Max  
## -4.828  -1.481  -0.443   1.315   9.914  
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    8.1522     0.3462  23.544   <2e-16 ***
## delta       -101.1090    56.9320  -1.776   0.0766 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 6.410515)
## 
##     Null deviance: 2404.9  on 373  degrees of freedom
## Residual deviance: 2384.7  on 372  degrees of freedom
## AIC: 1760.2
## 
## Number of Fisher Scoring iterations: 2
summary(glm(SS ~ delta, data= SS))
## 
## Call:
## glm(formula = SS ~ delta, data = SS)
## 
## Deviance Residuals: 
##      Min        1Q    Median        3Q       Max  
## -0.95105  -0.39693   0.00488   0.46804   0.69699  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.03197    0.06213   0.514    0.607    
## delta       90.25228   10.21612   8.834   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.2064203)
## 
##     Null deviance: 92.898  on 373  degrees of freedom
## Residual deviance: 76.788  on 372  degrees of freedom
## AIC: 475.25
## 
## Number of Fisher Scoring iterations: 2
summary(glm(SS ~ statereactance, data=SS))
## 
## Call:
## glm(formula = SS ~ statereactance, data = SS)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.6864  -0.5268   0.3136   0.4413   0.7604  
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.78208    0.08040   9.728  < 2e-16 ***
## statereactance -0.03191    0.01005  -3.174  0.00163 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.2431437)
## 
##     Null deviance: 92.898  on 373  degrees of freedom
## Residual deviance: 90.449  on 372  degrees of freedom
## AIC: 536.49
## 
## Number of Fisher Scoring iterations: 2
summary(glm(SS ~ statereactance + delta, data=SS))
## 
## Call:
## glm(formula = SS ~ statereactance + delta, data = SS)
## 
## Deviance Residuals: 
##      Min        1Q    Median        3Q       Max  
## -0.98153  -0.39206  -0.03113   0.45495   0.79918  
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.232616   0.097250   2.392  0.01726 *  
## statereactance -0.024613   0.009228  -2.667  0.00798 ** 
## delta          87.763668  10.176062   8.625  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.2030827)
## 
##     Null deviance: 92.898  on 373  degrees of freedom
## Residual deviance: 75.344  on 371  degrees of freedom
## AIC: 470.14
## 
## Number of Fisher Scoring iterations: 2

Looking at preference certainty

all$prefcertainty<-(all$prefstrength1 + all$prefstrength2)/2
summary(all$prefcertainty)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   2.000   4.000   4.500   4.399   5.000   5.000     446
certain<-subset(all, prefcertainty>=4.5)
uncertain<-subset(all, prefcertainty<=4.5)

#prefernce certainty didnt have a significant effect on staying with the default
summary(glm(stay~prefcertainty, data=all, family=binomial))
## 
## Call:
## glm(formula = stay ~ prefcertainty, family = binomial, data = all)
## 
## Deviance Residuals: 
##    Min      1Q  Median      3Q     Max  
## -1.351  -1.260   1.055   1.097   1.119  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)
## (Intercept)     0.6593     0.7809   0.844    0.399
## prefcertainty  -0.1040     0.1752  -0.594    0.553
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 510.62  on 370  degrees of freedom
## Residual deviance: 510.27  on 369  degrees of freedom
##   (623 observations deleted due to missingness)
## AIC: 514.27
## 
## Number of Fisher Scoring iterations: 3
#it did interact with condition, but in an unexpected way (lower preference certainty did increase the probability of choosing the default option in the SS default condition, but the opposite was true in the LL default condition. This appears to be due to the fact that preference certainty was correlated with preference extremity 
summary(glm(stay~prefcertainty*cond, data=all, family=binomial))
## 
## Call:
## glm(formula = stay ~ prefcertainty * cond, family = binomial, 
##     data = all)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.5740  -1.1661   0.8754   1.0037   1.5887  
## 
## Coefficients:
##                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)           -2.6201     1.1505  -2.277   0.0228 *  
## prefcertainty          0.6763     0.2589   2.612   0.0090 ** 
## condSS                 6.7481     1.6752   4.028 5.62e-05 ***
## prefcertainty:condSS  -1.5996     0.3759  -4.255 2.09e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 510.62  on 370  degrees of freedom
## Residual deviance: 488.58  on 367  degrees of freedom
##   (623 observations deleted due to missingness)
## AIC: 496.58
## 
## Number of Fisher Scoring iterations: 4
cor.test(all$prefcertainty, all$deltac)
## 
##  Pearson's product-moment correlation
## 
## data:  all$prefcertainty and all$deltac
## t = -6.3605, df = 546, p-value = 4.257e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.3389482 -0.1829107
## sample estimates:
##        cor 
## -0.2626458
#there was no 3 way interaction between preferences, preference certainty, and condition
summary(glm(stay~prefcertainty*deltac*cond, data=all, family=binomial))
## 
## Call:
## glm(formula = stay ~ prefcertainty * deltac * cond, family = binomial, 
##     data = all)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2566  -0.9015   0.5024   0.8523   2.1806  
## 
## Coefficients:
##                              Estimate Std. Error z value Pr(>|z|)   
## (Intercept)                   -1.7237     1.2694  -1.358  0.17452   
## prefcertainty                  0.4831     0.2853   1.694  0.09035 . 
## deltac                      -255.8227   492.8295  -0.519  0.60370   
## condSS                         4.8173     1.8456   2.610  0.00905 **
## prefcertainty:deltac         -21.5980   110.6875  -0.195  0.84529   
## prefcertainty:condSS          -1.1513     0.4157  -2.770  0.00561 **
## deltac:condSS                729.9731   853.1518   0.856  0.39221   
## prefcertainty:deltac:condSS   16.4295   191.7043   0.086  0.93170   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 510.62  on 370  degrees of freedom
## Residual deviance: 424.98  on 363  degrees of freedom
##   (623 observations deleted due to missingness)
## AIC: 440.98
## 
## Number of Fisher Scoring iterations: 4

table(all$stay)