Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AIAT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bonte Bruno
AIAT
Commits
413cd679
Commit
413cd679
authored
Mar 06, 2020
by
Bonte Bruno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
en train d organiser les graph
parent
014ffe42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
20 deletions
+35
-20
iat-leem-analysis.R
iat-leem-analysis.R
+35
-20
No files found.
iat-leem-analysis.R
View file @
413cd679
...
...
@@ -8,62 +8,77 @@ library(RColorBrewer)
#set working directory where this source file is
setwd
(
"/home/bruno/git/aiat"
)
lemmDataFolder
<-
"~/git/interexpe-data/formated-data"
#################################################################
## Pour ploter les distributions des temps de réactions à partir#
##### des résultats bruts #######
#################################################################
alldata
<-
read.table
(
"data/alldata-expe-lem.csv"
,
sep
=
","
,
dec
=
"."
,
header
=
T
)
%>%
alldata
<-
read.csv
(
file.path
(
lemmDataFolder
,
"iat-data.csv"
))
%>%
mutate
(
trial
=
trial
+
1
)
%>%
mutate
(
id
=
as.factor
(
participant.label
))
%>%
tbl_df
()
iat_scores
<-
alldata
%>%
filter
(
reactionTime
<
3000
)
%>%
filter
(
reactionTime
>
300
)
%>%
filter
(
trial
==
4
|
(
trial
==
7
))
%>%
group_by
(
id
)
%>%
group_by
(
id
,
test.status
)
%>%
mutate
(
full.sd
=
sd
(
reactionTime
))
%>%
group_by
(
id
,
trial
,
full.sd
)
%>%
group_by
(
id
,
trial
,
full.sd
,
test.status
,
refSession.traitement
)
%>%
summarise
(
mRT
=
mean
(
reactionTime
),
sdRT
=
sd
(
reactionTime
))
%>%
gather
(
variable
,
value
,
-
id
,
-
full.sd
,
-
trial
)
%>%
gather
(
variable
,
value
,
mRT
,
sdRT
)
%>%
unite
(
block
,
trial
,
variable
)
%>%
spread
(
block
,
value
,
sep
=
""
)
%>%
mutate
(
d
=
round
((
block7_mRT
-
block4_mRT
)
/
full.sd
,
digits
=
5
))
mutate
(
d
=
round
((
block7_mRT
-
block4_mRT
)
/
full.sd
,
digits
=
5
))
%>%
na.omit
()
iat_scores_train
<-
alldata
%>%
filter
(
reactionTime
<
3000
)
%>%
filter
(
reactionTime
>
300
)
%>%
filter
(
trial
==
3
|
(
trial
==
6
))
%>%
group_by
(
id
)
%>%
group_by
(
id
,
test.status
)
%>%
mutate
(
full.sd
=
sd
(
reactionTime
))
%>%
group_by
(
id
,
trial
,
full.sd
)
%>%
group_by
(
id
,
trial
,
full.sd
,
test.status
,
refSession.traitement
)
%>%
summarise
(
mRT
=
mean
(
reactionTime
),
sdRT
=
sd
(
reactionTime
))
%>%
gather
(
variable
,
value
,
-
id
,
-
full.sd
,
-
trial
)
%>%
gather
(
variable
,
value
,
mRT
,
sdRT
)
%>%
unite
(
block
,
trial
,
variable
)
%>%
spread
(
block
,
value
,
sep
=
""
)
%>%
mutate
(
d
=
round
((
block6_mRT
-
block3_mRT
)
/
full.sd
,
digits
=
5
))
mutate
(
d
=
round
((
block6_mRT
-
block3_mRT
)
/
full.sd
,
digits
=
5
))
%>%
na.omit
()
alldata
%>%
filter
(
test.status
!=
"onlyPre"
)
%>%
filter
(
reactionTime
<
3000
)
%>%
filter
(
reactionTime
>
300
)
%>%
filter
(
trial
==
4
|
(
trial
==
7
))
%>%
mutate
(
category
=
recode_factor
(
category
,
"A"
=
"Appropriation"
,
"P"
=
"Partage"
,
"1"
=
"Moi"
,
"2"
=
"PasMoi"
))
%>%
"A"
=
"Appropriation"
,
"P"
=
"Partage"
,
"1"
=
"Moi"
,
"2"
=
"PasMoi"
))
%>%
mutate
(
trial
=
as.factor
(
trial
))
%>%
left_join
(
iat_scores
,
by
=
'id'
)
%>%
mutate
(
lab
=
paste0
(
"id: "
,
id
,
"\n(d="
,
d
,
")"
))
%>%
left_join
(
iat_scores
,
by
=
c
(
'id'
,
"test.status"
,
"refSession.traitement"
)
)
%>%
mutate
(
lab
=
paste0
(
"Traitement: "
,
refSession.traitement
,
"\nid: "
,
id
,
" "
,
test.status
,
"\n(d="
,
d
,
")"
))
%>%
ggplot
()
+
geom_histogram
(
aes
(
x
=
reactionTime
,
fill
=
trial
),
position
=
"dodge"
)
+
facet_wrap
(
~
lab
,
scales
=
"free_x"
)
+
facet_wrap
(
~
lab
,
scales
=
"free_x"
)
+
theme
(
strip.text.x
=
element_text
(
size
=
5
))
+
ggsave
(
"per-trial-reaction-times-alldata.pdf"
,
height
=
21
,
width
=
29.7
,
units
=
"cm"
)
units
=
"cm"
)
iat_scores
%>%
mutate
(
sujet
=
(
as.factor
(
id
)))
%>%
mutate
(
when
=
-
as.numeric
(
test.status
))
%>%
ggplot
()
+
geom_bar
(
aes
(
x
=
sujet
,
y
=
d
,
fill
=
test.status
,
group
=
when
),
stat
=
"identity"
,
position
=
"dodge"
)
+
facet_wrap
(
~
refSession.traitement
,
scales
=
"free_x"
)
+
theme
(
axis.text.x
=
element_text
(
angle
=
90
,
hjust
=
1
,
vjust
=
0.5
))
+
scale_fill_discrete
(
breaks
=
c
(
"pre"
,
"post"
))
+
ggsave
(
"avant-apres-iat.pdf"
)
iat_scores
%>%
mutate
(
lab
=
(
as.factor
(
id
)))
%>%
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment