MU~decision time analysis

Load data

setwd("~/Projects/Prosociality DG_Sai/EX3 cost benefit")
pilotResult <- read.csv("pilotResult_core.csv")
library(ggplot2)

MU~time*conditions

model1 <- lm(Dictator_FinalValue ~ log(Dictator_StartToEndTicks)*(boost3+penalty3), data = pilotResult[pilotResult$Dictator_FinalValue > 0,], na.action = na.omit)
summary(model1)
## 
## Call:
## lm(formula = Dictator_FinalValue ~ log(Dictator_StartToEndTicks) * 
##     (boost3 + penalty3), data = pilotResult[pilotResult$Dictator_FinalValue > 
##     0, ], na.action = na.omit)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -43.33  -9.79   0.02   7.10  72.65 
## 
## Coefficients:
##                                        Estimate Std. Error t value
## (Intercept)                               56.50       6.79    8.32
## log(Dictator_StartToEndTicks)             -5.57       3.20   -1.74
## boost3                                   -14.05      10.29   -1.37
## penalty3                                 -19.65      11.32   -1.74
## log(Dictator_StartToEndTicks):boost3       1.01       4.42    0.23
## log(Dictator_StartToEndTicks):penalty3     7.85       4.67    1.68
##                                        Pr(>|t|)    
## (Intercept)                             1.4e-15 ***
## log(Dictator_StartToEndTicks)             0.082 .  
## boost3                                    0.173    
## penalty3                                  0.083 .  
## log(Dictator_StartToEndTicks):boost3      0.820    
## log(Dictator_StartToEndTicks):penalty3    0.094 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 19.9 on 406 degrees of freedom
## Multiple R-squared:  0.104,  Adjusted R-squared:  0.093 
## F-statistic: 9.43 on 5 and 406 DF,  p-value: 1.62e-08
pilotResult$rational[pilotResult$Dictator_FinalValue == 0 & !is.na(pilotResult$Dictator_FinalValue)] <- 1
pilotResult$rational[!pilotResult$Dictator_FinalValue == 0 & !is.na(pilotResult$Dictator_FinalValue)]  <- 0
model1 <- lm(log(Dictator_StartToEndTicks) ~ rational*(boost3+penalty3), data = pilotResult, na.action = na.omit)
summary(model1)#rational men take less time
## 
## Call:
## lm(formula = log(Dictator_StartToEndTicks) ~ rational * (boost3 + 
##     penalty3), data = pilotResult, na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3849 -0.3451 -0.0535  0.3393  1.7696 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         2.0610     0.0422   48.90  < 2e-16 ***
## rational           -0.1516     0.0880   -1.72    0.085 .  
## boost3              0.4128     0.0595    6.94  1.1e-11 ***
## penalty3            0.5388     0.0651    8.28  9.1e-16 ***
## rational:boost3    -0.3663     0.1267   -2.89    0.004 ** 
## rational:penalty3  -0.4930     0.1174   -4.20  3.1e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.518 on 567 degrees of freedom
## Multiple R-squared:  0.215,  Adjusted R-squared:  0.208 
## F-statistic:   31 on 5 and 567 DF,  p-value: <2e-16
pilotResult$Choices[pilotResult$rational == 1 & !is.na(pilotResult$rational)] <- "rational"
pilotResult$Choices[pilotResult$rational == 0 & !is.na(pilotResult$rational)]  <- "prosocial"
bar <- ggplot(pilotResult, aes(ConditionName, Dictator_StartToEndTicks, fill = Choices))
bar + stat_summary(fun.y = mean, geom = "bar") + stat_summary(fun.data = mean_cl_normal, geom = "errorbar",  width = 0.2) + facet_wrap(~Choices)+ labs(x = "ConditionName", y = "Time used", fill = "Choices") +ggtitle("Decision time comparison between prosocial actor and rational actor")

plot of chunk unnamed-chunk-3

Figure plot of chunk sourceFile

Contemplative fairness/absolute fairness analysis

## 
## Call:
## glm(formula = comtemplative_fairness ~ Dictator_StartToEndTicks * 
##     ConditionName, na.action = na.omit)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.8237  -0.3804  -0.0612   0.4040   0.9550  
## 
## Coefficients:
##                                               Estimate Std. Error t value
## (Intercept)                                    0.24327    0.06427    3.78
## Dictator_StartToEndTicks                       0.01848    0.00454    4.07
## ConditionNamecontrol                           0.42637    0.08694    4.90
## ConditionNamepenalty                          -0.24993    0.08644   -2.89
## Dictator_StartToEndTicks:ConditionNamecontrol -0.02913    0.00726   -4.01
## Dictator_StartToEndTicks:ConditionNamepenalty -0.00978    0.00592   -1.65
##                                               Pr(>|t|)    
## (Intercept)                                    0.00017 ***
## Dictator_StartToEndTicks                       5.3e-05 ***
## ConditionNamecontrol                           1.2e-06 ***
## ConditionNamepenalty                           0.00398 ** 
## Dictator_StartToEndTicks:ConditionNamecontrol  6.8e-05 ***
## Dictator_StartToEndTicks:ConditionNamepenalty  0.09889 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.1907)
## 
##     Null deviance: 136.21  on 572  degrees of freedom
## Residual deviance: 108.15  on 567  degrees of freedom
## AIC: 684.7
## 
## Number of Fisher Scoring iterations: 2

plot of chunk unnamed-chunk-4

## 
## Call:
## glm(formula = comtemplative_fairness ~ Dictator_StartToEndTicks * 
##     ConditionName, na.action = na.omit)
## 
## Deviance Residuals: 
##    Min      1Q  Median      3Q     Max  
## -0.853  -0.293   0.156   0.353   0.892  
## 
## Coefficients:
##                                               Estimate Std. Error t value
## (Intercept)                                    0.49190    0.07705    6.38
## Dictator_StartToEndTicks                       0.00786    0.00504    1.56
## ConditionNamecontrol                           0.45132    0.10388    4.34
## ConditionNamepenalty                          -0.42476    0.11543   -3.68
## Dictator_StartToEndTicks:ConditionNamecontrol -0.02948    0.00833   -3.54
## Dictator_StartToEndTicks:ConditionNamepenalty -0.00103    0.00695   -0.15
##                                               Pr(>|t|)    
## (Intercept)                                    4.7e-10 ***
## Dictator_StartToEndTicks                       0.11921    
## ConditionNamecontrol                           1.8e-05 ***
## ConditionNamepenalty                           0.00027 ***
## Dictator_StartToEndTicks:ConditionNamecontrol  0.00045 ***
## Dictator_StartToEndTicks:ConditionNamepenalty  0.88203    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.1915)
## 
##     Null deviance: 102.299  on 411  degrees of freedom
## Residual deviance:  77.758  on 406  degrees of freedom
## AIC: 496.2
## 
## Number of Fisher Scoring iterations: 2

plot of chunk unnamed-chunk-4

## 
## Call:
## glm(formula = absolute_fairness ~ Dictator_StartToEndTicks * 
##     ConditionName, na.action = na.omit)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.6337  -0.1496  -0.0693   0.3751   0.9373  
## 
## Coefficients:
##                                                Estimate Std. Error t value
## (Intercept)                                    0.061227   0.056293    1.09
## Dictator_StartToEndTicks                       0.000496   0.003975    0.12
## ConditionNamecontrol                           0.608412   0.076141    7.99
## ConditionNamepenalty                           0.059293   0.075705    0.78
## Dictator_StartToEndTicks:ConditionNamecontrol -0.011143   0.006357   -1.75
## Dictator_StartToEndTicks:ConditionNamepenalty  0.002008   0.005183    0.39
##                                               Pr(>|t|)    
## (Intercept)                                       0.28    
## Dictator_StartToEndTicks                          0.90    
## ConditionNamecontrol                           7.5e-15 ***
## ConditionNamepenalty                              0.43    
## Dictator_StartToEndTicks:ConditionNamecontrol     0.08 .  
## Dictator_StartToEndTicks:ConditionNamepenalty     0.70    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.1463)
## 
##     Null deviance: 112.611  on 572  degrees of freedom
## Residual deviance:  82.956  on 567  degrees of freedom
## AIC: 532.7
## 
## Number of Fisher Scoring iterations: 2

plot of chunk unnamed-chunk-4

## 
## Call:
## glm(formula = absolute_fairness ~ Dictator_StartToEndTicks * 
##     ConditionName, na.action = na.omit)
## 
## Deviance Residuals: 
##    Min      1Q  Median      3Q     Max  
## -0.853  -0.192  -0.083   0.193   0.941  
## 
## Coefficients:
##                                               Estimate Std. Error t value
## (Intercept)                                    0.10596    0.06698    1.58
## Dictator_StartToEndTicks                      -0.00150    0.00438   -0.34
## ConditionNamecontrol                           0.83726    0.09030    9.27
## ConditionNamepenalty                           0.24863    0.10035    2.48
## Dictator_StartToEndTicks:ConditionNamecontrol -0.02011    0.00725   -2.78
## Dictator_StartToEndTicks:ConditionNamepenalty -0.00472    0.00604   -0.78
##                                               Pr(>|t|)    
## (Intercept)                                     0.1144    
## Dictator_StartToEndTicks                        0.7312    
## ConditionNamecontrol                            <2e-16 ***
## ConditionNamepenalty                            0.0136 *  
## Dictator_StartToEndTicks:ConditionNamecontrol   0.0058 ** 
## Dictator_StartToEndTicks:ConditionNamepenalty   0.4344    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.1447)
## 
##     Null deviance: 96.437  on 411  degrees of freedom
## Residual deviance: 58.762  on 406  degrees of freedom
## AIC: 380.8
## 
## Number of Fisher Scoring iterations: 2

plot of chunk unnamed-chunk-4