-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path3.3-4_Durations.R
127 lines (103 loc) · 4.08 KB
/
3.3-4_Durations.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
require(itsadug) # mgcv lazy-loaded
options(show.signif.stars=FALSE)
############################
### FIRST RUN DWELL TIME ###
############################
### PREPOSITION ###
rm(list=ls()) # clear all
preposition_first_dwell_data = read.csv('preposition_first_dwell_data.csv')
preposition_first_dwell_data$Category = relevel(preposition_first_dwell_data$Category,
ref='natural')
preposition_first_dwell_data$InterestArea = relevel(preposition_first_dwell_data$InterestArea,
ref='A')
preposition_first_dwell_data$CanonicalFirst = relevel(preposition_first_dwell_data$CanonicalFirst,
ref='yes')
summary(preposition_first_dwell_data.gam <-
bam(first_dwell_power_transformed ~
CanonicalFirst +
Category * InterestArea +
s(Item, bs='re') +
s(TrialScaled, Participant, bs='fs', m=1),
data=preposition_first_dwell_data))
### VOICE ###
rm(list=ls()) # clear all
voice_first_dwell_data = read.csv('voice_first_dwell_data.csv')
voice_first_dwell_data$Category = relevel(voice_first_dwell_data$Category,
ref='natural')
voice_first_dwell_data$InterestArea = relevel(voice_first_dwell_data$InterestArea,
ref='A')
voice_first_dwell_data$CanonicalFirst = relevel(voice_first_dwell_data$CanonicalFirst,
ref='yes')
summary(voice_first_dwell_data.gam <-
bam(first_dwell_power_transformed ~
CanonicalFirst +
Category + InterestArea +
s(Item, bs='re') +
s(TrialScaled, Participant, bs='fs', m=1),
data=voice_first_dwell_data))
### DATIVE ###
rm(list=ls()) # clear all
dative_first_dwell_data = read.csv('dative_first_dwell_data.csv')
dative_first_dwell_data$Category = relevel(dative_first_dwell_data$Category,
ref='natural')
dative_first_dwell_data$InterestArea = relevel(dative_first_dwell_data$InterestArea,
ref='A')
dative_first_dwell_data$CanonicalFirst = relevel(dative_first_dwell_data$CanonicalFirst,
ref='yes')
summary(dative_first_dwell_data.gam <-
bam(first_dwell_power_transformed ~
CanonicalFirst +
Category + InterestArea +
s(Item, bs='re') +
s(TrialScaled, Participant, bs='fs', m=1),
data=dative_first_dwell_data))
###########################
### IA TOTAL DWELL TIME ###
###########################
### PREPOSITION ###
rm(list=ls()) # clear all
preposition_total_dwell_data = read.csv('preposition_total_dwell_data.csv')
preposition_total_dwell_data$Category = relevel(preposition_total_dwell_data$Category,
ref='natural')
preposition_total_dwell_data$InterestArea = relevel(preposition_total_dwell_data$InterestArea,
ref='A')
preposition_total_dwell_data$CanonicalFirst = relevel(preposition_total_dwell_data$CanonicalFirst,
ref='yes')
summary(preposition_total_dwell_data.gam <-
bam(total_dwell_power_transformed ~
CanonicalFirst +
Category * InterestArea +
s(Item, bs='re') +
s(TrialScaled, Participant, bs='fs', m=1),
data=preposition_total_dwell_data))
### VOICE ###
rm(list=ls()) # clear all
voice_total_dwell_data = read.csv('voice_total_dwell_data.csv')
voice_total_dwell_data$Category = relevel(voice_total_dwell_data$Category,
ref='natural')
voice_total_dwell_data$InterestArea = relevel(voice_total_dwell_data$InterestArea,
ref='A')
voice_total_dwell_data$CanonicalFirst = relevel(voice_total_dwell_data$CanonicalFirst,
ref='yes')
summary(voice_total_dwell_data.gam <-
bam(total_dwell_power_transformed ~
Category +
s(Item, bs='re') +
s(TrialScaled, Participant, bs='fs', m=1),
data=voice_total_dwell_data))
### DATIVE ###
rm(list=ls()) # clear all
dative_total_dwell_data = read.csv('dative_total_dwell_data.csv')
dative_total_dwell_data$Category = relevel(dative_total_dwell_data$Category,
ref='natural')
dative_total_dwell_data$InterestArea = relevel(dative_total_dwell_data$InterestArea,
ref='A')
dative_total_dwell_data$CanonicalFirst = relevel(dative_total_dwell_data$CanonicalFirst,
ref='yes')
summary(dative_total_dwell_data.gam <-
bam(total_dwell_power_transformed ~
CanonicalFirst +
Category + InterestArea +
s(Item, bs='re') +
s(TrialScaled, Participant, bs='fs', m=1),
data=dative_total_dwell_data))