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 = 14.373, df = 2, p-value = 0.0007566
## alternative hypothesis: two.sided
## sample estimates:
##    prop 1    prop 2    prop 3 
## 0.5964467 0.5395189 0.4639423

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 = 3.6159, df = 1, p-value = 0.05723
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.002017294  0.153170479
## sample estimates:
##    prop 1    prop 2 
## 0.5395189 0.4639423
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 = 1.9896, df = 1, p-value = 0.1584
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.02106869  0.13492429
## sample estimates:
##    prop 1    prop 2 
## 0.5964467 0.5395189
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.73, df = 1, p-value = 0.000211
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  0.06189135 0.20311744
## sample estimates:
##    prop 1    prop 2 
## 0.5964467 0.4639423

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.2651  -1.0263   0.2773   1.1712   1.6335  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   -1.1296     0.3002  -3.763 0.000168 ***
## condSS        -1.3685     0.4540  -3.014 0.002576 ** 
## delta        170.6853    48.6619   3.508 0.000452 ***
## condSS:delta 318.6699    79.6266   4.002 6.28e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 980.04  on 706  degrees of freedom
## Residual deviance: 876.59  on 703  degrees of freedom
## AIC: 884.59
## 
## 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.1563  -0.9747  -0.7037   1.1410   2.1506  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)    -2.7095     0.3101  -8.737  < 2e-16 ***
## condno          1.5799     0.4316   3.661 0.000252 ***
## delta         395.8623    49.7476   7.957 1.76e-15 ***
## condno:delta -225.1770    69.5903  -3.236 0.001213 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 935.25  on 684  degrees of freedom
## Residual deviance: 839.84  on 681  degrees of freedom
## AIC: 847.84
## 
## 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.003775 0.004620 0.005699 0.007145 0.014980
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 = 15.371, df = 1, p-value = 8.832e-05
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.22527435 -0.07458539
## sample estimates:
##    prop 1    prop 2 
## 0.3935484 0.5434783

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.2651  -0.8901  -0.6681   0.9967   2.1506  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)    -0.4535     0.1146  -3.957 7.58e-05 ***
## deltac        395.8623    49.7476   7.957 1.76e-15 ***
## condSS          0.7443     0.1623   4.585 4.55e-06 ***
## deltac:condSS  93.4929    80.2948   1.164    0.244    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1120.28  on 809  degrees of freedom
## Residual deviance:  939.56  on 806  degrees of freedom
## AIC: 947.56
## 
## Number of Fisher Scoring iterations: 4
summary(all$deltac)
##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## -0.004552 -0.001924 -0.001079  0.000000  0.001446  0.009280
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.081643, df = 1, p-value = 0.7751
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.1590716  0.2499807
## sample estimates:
##    prop 1    prop 2 
## 0.5000000 0.4545455
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 = 1.204, df = 1, p-value = 0.2725
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.07031088  0.28219861
## sample estimates:
##    prop 1    prop 2 
## 0.5869565 0.4810127
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.235, df = 1, p-value = 1.156e-05
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  0.1226600 0.3212614
## sample estimates:
##    prop 1    prop 2 
## 0.5779817 0.3560209

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.5052  -1.4177  -0.4016   1.3604   9.8014  
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     6.7561     0.3109  21.733  < 2e-16 ***
## condSS          1.3267     0.4497   2.950  0.00327 ** 
## delta         143.2256    49.1898   2.912  0.00369 ** 
## condSS:delta -227.0813    72.6401  -3.126  0.00183 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 6.243609)
## 
##     Null deviance: 5100.8  on 809  degrees of freedom
## Residual deviance: 5032.3  on 806  degrees of freedom
## AIC: 3788.2
## 
## 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.5563  -1.2707   0.9349   1.0349   1.5920  
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## (Intercept)     1.24191    0.23510   5.283 1.27e-07 ***
## statereactance -0.12814    0.02921  -4.387 1.15e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 1109  on 809  degrees of freedom
## Residual deviance: 1089  on 808  degrees of freedom
## AIC: 1093
## 
## 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.2651  -0.9592   0.5755   0.8324   2.1563  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)     2.7095     0.3101   8.737  < 2e-16 ***
## condSS         -5.2077     0.4607 -11.305  < 2e-16 ***
## delta        -395.8623    49.7476  -7.957 1.76e-15 ***
## condSS:delta  885.2174    80.2948  11.025  < 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: 1108.99  on 809  degrees of freedom
## Residual deviance:  939.56  on 806  degrees of freedom
## AIC: 947.56
## 
## 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.3387  -0.9422   0.5379   0.8755   2.2381  
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       3.51222    0.39657   8.857  < 2e-16 ***
## statereactance   -0.11272    0.03261  -3.457 0.000547 ***
## condSS           -5.15590    0.46505 -11.087  < 2e-16 ***
## delta          -385.66735   49.97731  -7.717 1.19e-14 ***
## condSS:delta    876.32073   81.02577  10.815  < 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: 1108.99  on 809  degrees of freedom
## Residual deviance:  927.35  on 805  degrees of freedom
## AIC: 937.35
## 
## 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.5052  -1.3992  -0.3637   1.5650   7.6727  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   6.7561     0.3104  21.762  < 2e-16 ***
## delta       143.2256    49.1225   2.916  0.00375 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 6.226538)
## 
##     Null deviance: 2493.7  on 393  degrees of freedom
## Residual deviance: 2440.8  on 392  degrees of freedom
## AIC: 1842.7
## 
## 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.9676  -0.2977  -0.2167   0.3629   0.9775  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.08444    0.05494  -1.537    0.125    
## delta       84.44908    8.69267   9.715   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.194981)
## 
##     Null deviance: 94.835  on 393  degrees of freedom
## Residual deviance: 76.433  on 392  degrees of freedom
## AIC: 477.99
## 
## 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.5603  -0.3867  -0.3288   0.5554   0.7291  
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)   
## (Intercept)     0.18404    0.07783   2.365  0.01853 * 
## statereactance  0.02895    0.00974   2.972  0.00314 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.236596)
## 
##     Null deviance: 94.835  on 393  degrees of freedom
## Residual deviance: 92.746  on 392  degrees of freedom
## AIC: 554.21
## 
## 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.9921  -0.2978  -0.1933   0.3843   0.9429  
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    -0.197850   0.081371  -2.431   0.0155 *  
## statereactance  0.016786   0.008909   1.884   0.0603 .  
## delta          82.044842   8.757978   9.368   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.1937207)
## 
##     Null deviance: 94.835  on 393  degrees of freedom
## Residual deviance: 75.745  on 391  degrees of freedom
## AIC: 476.42
## 
## 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.8137  -1.5033  -0.4946   1.3079   9.8014  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   8.0828     0.3254  24.841   <2e-16 ***
## delta       -83.8558    53.5196  -1.567    0.118    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 6.259773)
## 
##     Null deviance: 2606.9  on 415  degrees of freedom
## Residual deviance: 2591.5  on 414  degrees of freedom
## AIC: 1947.6
## 
## 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.95807  -0.38996  -0.01069   0.46804   0.70756  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.01405    0.05882   0.239    0.811    
## delta       92.70198    9.67431   9.582   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.2045374)
## 
##     Null deviance: 103.459  on 415  degrees of freedom
## Residual deviance:  84.678  on 414  degrees of freedom
## AIC: 524.36
## 
## 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.6867  -0.5233   0.3133   0.4440   0.7707  
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.784668   0.077380  10.140  < 2e-16 ***
## statereactance -0.032666   0.009658  -3.382 0.000787 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.2431819)
## 
##     Null deviance: 103.46  on 415  degrees of freedom
## Residual deviance: 100.68  on 414  degrees of freedom
## AIC: 596.35
## 
## 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.99491  -0.38732  -0.04527   0.44887   0.81722  
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.22666    0.09194   2.465  0.01410 *  
## statereactance -0.02630    0.00880  -2.989  0.00296 ** 
## delta          90.49617    9.61127   9.416  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.2006907)
## 
##     Null deviance: 103.459  on 415  degrees of freedom
## Residual deviance:  82.885  on 413  degrees of freedom
## AIC: 517.45
## 
## 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.402   5.000   5.000     491
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.338  -1.257   1.062   1.100   1.120  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)
## (Intercept)     0.6036     0.7332   0.823     0.41
## prefcertainty  -0.0932     0.1641  -0.568     0.57
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 563.27  on 408  degrees of freedom
## Residual deviance: 562.95  on 407  degrees of freedom
##   (692 observations deleted due to missingness)
## AIC: 566.95
## 
## 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.5850  -1.1753   0.8981   1.0157   1.6844  
## 
## Coefficients:
##                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)           -2.3690     1.0459  -2.265  0.02351 *  
## prefcertainty          0.6138     0.2351   2.611  0.00903 ** 
## condSS                 6.5308     1.5789   4.136 3.53e-05 ***
## prefcertainty:condSS  -1.5397     0.3532  -4.359 1.31e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 563.27  on 408  degrees of freedom
## Residual deviance: 540.52  on 405  degrees of freedom
##   (692 observations deleted due to missingness)
## AIC: 548.52
## 
## 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.7525, df = 608, p-value = 3.401e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.3364553 -0.1886963
## sample estimates:
##        cor 
## -0.2641249
#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.2970  -0.8924   0.4983   0.8596   2.0358  
## 
## Coefficients:
##                             Estimate Std. Error z value Pr(>|z|)   
## (Intercept)                  -1.3954     1.1784  -1.184  0.23636   
## prefcertainty                 0.4015     0.2645   1.518  0.12896   
## deltac                      -30.5108   427.5352  -0.071  0.94311   
## condSS                        4.6661     1.7642   2.645  0.00817 **
## prefcertainty:deltac        -73.6199    97.3360  -0.756  0.44944   
## prefcertainty:condSS         -1.0973     0.3964  -2.768  0.00564 **
## deltac:condSS               350.1642   812.1908   0.431  0.66637   
## prefcertainty:deltac:condSS 109.4699   183.3222   0.597  0.55041   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 563.27  on 408  degrees of freedom
## Residual deviance: 467.15  on 401  degrees of freedom
##   (692 observations deleted due to missingness)
## AIC: 483.15
## 
## Number of Fisher Scoring iterations: 4

table(all$stay)