Commit 47284d71 authored by Simon Ciranka's avatar Simon Ciranka

latest marble analysis

parent 7aafe070
......@@ -13,6 +13,8 @@ library(cowplot)
library(tidyverse)
library(rstan)
source("../../../R/Helpers/Start_Workflow.R")
source('../../../R/Helpers/R_rainclouds.R')
#source('../../../R/Helpers/summarySE.R')
```
# Marble Data
......@@ -241,12 +243,11 @@ Participants also were all Optimistic for low probabilites and Pessimistic for h
## Who is most Confident?
```{r}
MarbleData%>%filter(DFE1DFD0=="1"&PercentBlueEstimate!="NULL")%>%
ggplot(aes(x=Agegroup,y=HowSure,alpha=Agegroup))+
stat_summary(geom="bar",fun.y="mean")+
stat_summary(geom="pointrange",fun.y=mean,fun.ymin =function(x) mean(x)-1.96*(sd(x)/sqrt(length(x))),fun.ymax=function(x) mean(x)+1.96*(sd(x)/sqrt(length(x))),position = position_dodge(0.9),alpha=0.7)+
#geom_jitter(aes(x=as.numeric(Agegroup),y=HowSure))+
scale_x_discrete(name="Agegroup",breaks=c(0,1,2),labels=c("Kids","Adolescents","Adults"))+
scale_y_continuous(name="Confidence Rating")+
guides(alpha=F)+
......@@ -257,7 +258,27 @@ ggsave(filename="X_Figures/Confidence.pdf")
```
##### Is this substantial?
Probably not.
Adolescents report to be least confident with their estimation.
But if we look at the whole spectrum all age groups actually do seem fairly similar to one another.
```{r}
MarbleData%>%filter(DFE1DFD0=="1"&PercentBlueEstimate!="NULL")%>%
ggplot(aes(y=HowSure,x=Agegroup,group=Agegroup))+
geom_jitter(aes(color=PercentBlueShownRel),width = 0.1)+
# stat_summary(fun.data = mean_cl_boot,geom="pointrange",size=1,color="red")+
geom_flat_violin(position = position_nudge(x = .25, y = 0),adjust =2, trim = TRUE,alpha=0.1,fill="black")+
geom_boxplot(aes(x = as.numeric(Agegroup)+0.2, y = HowSure),outlier.shape = NA, alpha = 0.3, width = .1, colour = "BLACK", nudge_x = 1, nudge_y = 2) +
scale_color_viridis_d(name="Observed outcome Probability")+
scale_x_discrete(name="Agegroup",breaks=c(0,1,2),labels=c("Kids","Adolescents","Adults"))+
#geom_hline(yintercept = 150,linetype="dotdash")+
scale_y_continuous(name="Confidence Rating")+
ggtitle("Mean Confidence per Subject")
```
## How does the Estimation Accuracy Relate to Confidence?
......
Developping\_Marbles
================
Simon
16/01/2019
06/05/2019
- [Marble Data](#marble-data)
- [look at the subjects.](#look-at-the-subjects.)
......@@ -11,6 +11,7 @@ Simon
- [Within subject change.](#within-subject-change.)
- [How Good were they at Estimating?](#how-good-were-they-at-estimating)
- [Who is most Confident?](#who-is-most-confident)
- [Is this substantial?](#is-this-substantial)
- [How does the Estimation Accuracy Relate to Confidence?](#how-does-the-estimation-accuracy-relate-to-confidence)
- [Inverse U?](#inverse-u)
- [Here i prepare the Rest of the Data](#here-i-prepare-the-rest-of-the-data)
......@@ -154,6 +155,7 @@ MarbleData%>%filter(DFE1DFD0=="1"&PercentBlueEstimate!="NULL")%>%
ggplot(aes(x=Agegroup,y=HowSure,alpha=Agegroup))+
stat_summary(geom="bar",fun.y="mean")+
stat_summary(geom="pointrange",fun.y=mean,fun.ymin =function(x) mean(x)-1.96*(sd(x)/sqrt(length(x))),fun.ymax=function(x) mean(x)+1.96*(sd(x)/sqrt(length(x))),position = position_dodge(0.9),alpha=0.7)+
#geom_jitter(aes(x=as.numeric(Agegroup),y=HowSure))+
scale_x_discrete(name="Agegroup",breaks=c(0,1,2),labels=c("Kids","Adolescents","Adults"))+
scale_y_continuous(name="Confidence Rating")+
guides(alpha=F)+
......@@ -173,7 +175,27 @@ ggsave(filename="X_Figures/Confidence.pdf")
## Warning: Using alpha for a discrete variable is not advised.
Adolescents report to be least confident with their estimation.
##### Is this substantial?
Probably not. Adolescents report to be least confident with their estimation. But if we look at the whole spectrum all age groups actually do seem fairly similar to one another.
``` r
MarbleData%>%filter(DFE1DFD0=="1"&PercentBlueEstimate!="NULL")%>%
ggplot(aes(y=HowSure,x=Agegroup,group=Agegroup))+
geom_jitter(aes(color=PercentBlueShownRel),width = 0.1)+
# stat_summary(fun.data = mean_cl_boot,geom="pointrange",size=1,color="red")+
geom_flat_violin(position = position_nudge(x = .25, y = 0),adjust =2, trim = TRUE,alpha=0.1,fill="black")+
geom_boxplot(aes(x = as.numeric(Agegroup)+0.2, y = HowSure),outlier.shape = NA, alpha = 0.3, width = .1, colour = "BLACK", nudge_x = 1, nudge_y = 2) +
scale_color_viridis_d(name="Observed outcome Probability")+
scale_x_discrete(name="Agegroup",breaks=c(0,1,2),labels=c("Kids","Adolescents","Adults"))+
#geom_hline(yintercept = 150,linetype="dotdash")+
scale_y_continuous(name="Confidence Rating")+
ggtitle("Mean Confidence per Subject")
```
## Warning: Ignoring unknown parameters: nudge_x, nudge_y
![](Analyze_files/figure-markdown_github/unnamed-chunk-7-1.png)
How does the Estimation Accuracy Relate to Confidence?
------------------------------------------------------
......@@ -205,7 +227,7 @@ MarbleData%>%filter(DFE1DFD0=="1"&PercentBlueEstimate!="NULL")%>%mutate(
## Warning: Removed 4 rows containing missing values (geom_pointrange).
![](Analyze_files/figure-markdown_github/unnamed-chunk-7-1.png)
![](Analyze_files/figure-markdown_github/unnamed-chunk-8-1.png)
I cant make much of this inverted U shape. Does this really mean, that when they are super wrong, then they are most confident? This bias seems to be least present in Kids.
......@@ -238,7 +260,7 @@ MarbleData%>%filter(DFE1DFD0=="1"&PercentBlueEstimate!="NULL")%>%mutate(
## Warning: Removed 14 rows containing missing values (geom_pointrange).
![](Analyze_files/figure-markdown_github/unnamed-chunk-8-1.png)
![](Analyze_files/figure-markdown_github/unnamed-chunk-9-1.png)
Here i prepare the Rest of the Data
===================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment