-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstatistics.R
91 lines (73 loc) · 3.96 KB
/
statistics.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
gazestatistics <- read_excel("projects/engagement-l2tor/gazestatistics.xlsx", sheet="gaze2stats", col_names = FALSE)
x <- gazestatistics[[3]]
y <- gazestatistics[[6]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT ROBOT VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col="blue")
x <-gazestatistics[[4]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT TABLET VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col="blue")
x <-gazestatistics[[5]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT OTHER VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col="blue")
#first subset, excluding yellow videos and participant with an asian background
gazestatistics <- read_excel("projects/engagement-l2tor/gazestatistics.xlsx", sheet="withoutyellowandasians", col_names = TRUE)
x <- gazestatistics[[3]]
y <- gazestatistics[[6]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT ROBOT VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
x <- gazestatistics[[4]]
y <- gazestatistics[[6]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT TABLET VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
x <- gazestatistics[[5]]
y <- gazestatistics[[6]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT OTHER VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
#second subset, with two scores >0
gazestatistics <- read_excel("projects/engagement-l2tor/gazestatistics.xlsx", sheet="minstens2groterdan1", col_names = TRUE)
x <- gazestatistics[[3]]
y <- gazestatistics[[6]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT ROBOT VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
x <- gazestatistics[[4]]
y <- gazestatistics[[6]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT TABLET VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
x <- gazestatistics[[5]]
y <- gazestatistics[[6]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT OTHER VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
#comparing annotated stuff
gazestatistics <- read_excel("projects/engagement-l2tor/gazestatistics.xlsx", sheet="annotated", col_names = TRUE)
x <- gazestatistics[[3]]
y <- gazestatistics[[6]]
z <- gazestatistics[[7]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT ROBOT VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
plot(z,y, main = "NUMBER OF ANNOTATED GAZES AT ROBOT VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
x <- gazestatistics[[4]]
y <- gazestatistics[[6]]
z <- gazestatistics[[8]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT TABLET VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
plot(z,y, main = "NUMBER OF ANNOTATED GAZES AT TABLET VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
cor.test(z,y)
x <- gazestatistics[[5]]
y <- gazestatistics[[6]]
cor.test(x,y)
plot(x,y, main = "NUMBER OF GAZES AT OTHER VERSUS ENGAGEMENT RATINGS", xlab = "number of gazes", ylab = "engagement", col = "blue")
#whether smiling is correlated with high engagement
smiling <- read_excel("projects/engagement-l2tor/gazestatistics.xlsx", sheet="smiling", col_names=FALSE)
x <- smiling[[2]]
y <- smiling[[3]]
cor.test(x,y)
plot(x,y, main = "PREDICTION OF SMILING VERSUS ENGAGEMENT", xlab = "smiling", ylab = "engagement", col = "blue")
#does movement correlate with engagement?
smiling <- read_excel("projects/engagement-l2tor/gazestatistics.xlsx", sheet="smiling", col_names=TRUE)
x <- smiling[[3]]
y <- smiling[[5]]
cor.test(x,y)
plot(x,y, main = "BODY MOVEMENT VERSUS ENGAGEMENT", ylab = "movement", xlab = "engagement", col = "blue")
z <- smiling[[6]]
cor.test(x,z)
plot(x,z, main = "HEAD MOVEMENT VERSUS ENGAGEMENT", ylab = "movement", xlab = "engagement", col="blue")