Subjective questionnaire

#install.packages(c("ggplot2", "doBy"))
require(ggplot2)
## Loading required package: ggplot2
require(doBy)
## Loading required package: doBy
## Loading required package: survival
## Loading required package: splines
## Loading required package: MASS
require(psych)
## Loading required package: psych
## 
## Attaching package: 'psych'
## 
## The following object is masked from 'package:ggplot2':
## 
##     %+%
library(reshape2)
require(xtable)
## Loading required package: xtable
library("grid")
library(RColorBrewer)

data <- read.csv(file="data/Resultados.csv", head=TRUE, skip=1, sep=",")
names(data)

Demographics

s <- describe(data[,c(4:9)])
s <- cbind(Device=rownames(s), s)

rownames(s)<-NULL

print(xtable(s), type = "html")
Device vars n mean sd median trimmed mad min max range skew kurtosis se
1 Gender* 1 9.00 1.44 0.53 1.00 1.44 0.00 1.00 2.00 1.00 0.19 -2.17 0.18
2 Age* 2 9.00 2.33 0.87 2.00 2.33 0.00 1.00 4.00 3.00 0.46 -0.76 0.29
3 How.often.do.you.use.a.computer.* 3 9.00 1.11 0.33 1.00 1.11 0.00 1.00 2.00 1.00 2.07 2.63 0.11
4 How.often.do.you.use.a.computer.mouse.* 4 9.00 1.11 0.33 1.00 1.11 0.00 1.00 2.00 1.00 2.07 2.63 0.11
5 How.often.do.you.use.a.Leap.Motion.* 5 9.00 1.00 0.00 1.00 1.00 0.00 1.00 1.00 0.00 0.00
6 Timestamp.1* 6 9.00 5.00 2.74 5.00 5.00 2.97 1.00 9.00 8.00 0.00 -1.60 0.91
write.table(s, file = "tables/questionnaire-demographics-summary.csv", sep=",", row.names=FALSE)
s <- describe(data[,c(10:21)])
s <- cbind(Device=rownames(s), s)

rownames(s)<-NULL
print(xtable(s), type = "html")
Device vars n mean sd median trimmed mad min max range skew kurtosis se
1 Force.required.for.actuation 1 9.00 4.78 0.44 5.00 4.78 0.00 4.00 5.00 1.00 -1.12 -0.80 0.15
2 Smoothness.during.operation 2 9.00 4.44 0.73 5.00 4.44 0.00 3.00 5.00 2.00 -0.70 -1.03 0.24
3 Effort.required.for.operation 3 9.00 4.33 0.71 4.00 4.33 1.48 3.00 5.00 2.00 -0.42 -1.22 0.24
4 Accuracy 4 9.00 4.67 0.50 5.00 4.67 0.00 4.00 5.00 1.00 -0.59 -1.81 0.17
5 Operation.Speed 5 9.00 4.44 1.01 5.00 4.44 0.00 2.00 5.00 3.00 -1.47 0.82 0.34
6 General.comfort 6 9.00 4.56 0.53 5.00 4.56 0.00 4.00 5.00 1.00 -0.19 -2.17 0.18
7 Overall.operation.of.input.device 7 9.00 4.89 0.33 5.00 4.89 0.00 4.00 5.00 1.00 -2.07 2.63 0.11
8 Finger.fatigue 8 9.00 4.89 0.33 5.00 4.89 0.00 4.00 5.00 1.00 -2.07 2.63 0.11
9 Wrist.fatigue 9 9.00 4.67 0.50 5.00 4.67 0.00 4.00 5.00 1.00 -0.59 -1.81 0.17
10 Arm.fatigue 10 9.00 4.22 1.09 5.00 4.22 0.00 2.00 5.00 3.00 -0.89 -0.78 0.36
11 Shoulder.fatigue 11 9.00 4.78 0.44 5.00 4.78 0.00 4.00 5.00 1.00 -1.12 -0.80 0.15
12 Neck.fatigue 12 9.00 5.00 0.00 5.00 5.00 0.00 5.00 5.00 0.00 0.00
write.table(s, file = "tables/questionnaire-mouse-summary.csv", sep=",", row.names=FALSE)
s <- describe(data[,c(23:34)])
s <- cbind(Device=rownames(s), s)

rownames(s)<-NULL
print(xtable(s), type = "html")
Device vars n mean sd median trimmed mad min max range skew kurtosis se
1 Force.required.for.actuation.1 1 9.00 2.78 1.48 3.00 2.78 1.48 1.00 5.00 4.00 0.34 -1.40 0.49
2 Smoothness.during.operation.1 2 9.00 3.33 1.12 3.00 3.33 1.48 2.00 5.00 3.00 0.37 -1.44 0.37
3 Effort.required.for.operation.1 3 9.00 2.11 0.78 2.00 2.11 1.48 1.00 3.00 2.00 -0.15 -1.54 0.26
4 Accuracy.1 4 9.00 2.89 1.17 3.00 2.89 1.48 1.00 5.00 4.00 0.18 -0.88 0.39
5 Operation.Speed.1 5 9.00 3.22 1.09 3.00 3.22 0.00 1.00 5.00 4.00 -0.38 -0.26 0.36
6 General.comfort.1 6 9.00 1.89 0.78 2.00 1.89 1.48 1.00 3.00 2.00 0.15 -1.54 0.26
7 Overall.operation.of.input.device.1 7 9.00 2.56 0.88 3.00 2.56 1.48 1.00 4.00 3.00 -0.15 -1.04 0.29
8 Finger.fatigue.1 8 9.00 4.11 1.36 5.00 4.11 0.00 1.00 5.00 4.00 -1.22 0.15 0.45
9 Wrist.fatigue.1 9 9.00 3.56 1.33 3.00 3.56 1.48 1.00 5.00 4.00 -0.39 -1.03 0.44
10 Arm.fatigue.1 10 9.00 2.33 1.00 2.00 2.33 1.48 1.00 4.00 3.00 0.07 -1.37 0.33
11 Shoulder.fatigue.1 11 9.00 2.78 1.39 3.00 2.78 1.48 1.00 5.00 4.00 0.10 -1.54 0.46
12 Neck.fatigue.1 12 9.00 3.78 1.48 4.00 3.78 1.48 1.00 5.00 4.00 -0.69 -1.18 0.49
write.table(s, file = "tables/questionnaire-leapmotionscreentap-summary.csv", sep=",", row.names=FALSE)
s <- describe(data[,c(36:47)])
s <- cbind(Device=rownames(s), s)

rownames(s)<-NULL
print(xtable(s), type = "html")
Device vars n mean sd median trimmed mad min max range skew kurtosis se
1 Force.required.for.actuation.2 1 9.00 3.67 1.50 4.00 3.67 1.48 1.00 5.00 4.00 -0.48 -1.43 0.50
2 Smoothness.during.operation.2 2 9.00 3.33 1.41 4.00 3.33 1.48 1.00 5.00 4.00 -0.29 -1.56 0.47
3 Effort.required.for.operation.2 3 9.00 2.78 1.20 3.00 2.78 1.48 1.00 4.00 3.00 -0.40 -1.56 0.40
4 Accuracy.2 4 9.00 3.00 1.12 3.00 3.00 1.48 1.00 4.00 3.00 -0.48 -1.44 0.37
5 Operation.Speed.2 5 9.00 3.78 1.39 4.00 3.78 1.48 2.00 5.00 3.00 -0.39 -1.86 0.46
6 General.comfort.2 6 9.00 2.67 1.32 3.00 2.67 1.48 1.00 4.00 3.00 -0.32 -1.81 0.44
7 Overall.operation.of.input.device.2 7 9.00 3.33 1.58 3.00 3.33 2.97 1.00 5.00 4.00 -0.32 -1.53 0.53
8 Finger.fatigue.2 8 9.00 4.00 1.58 5.00 4.00 0.00 1.00 5.00 4.00 -0.84 -1.15 0.53
9 Wrist.fatigue.2 9 9.00 3.89 1.76 5.00 3.89 0.00 1.00 5.00 4.00 -0.82 -1.29 0.59
10 Arm.fatigue.2 10 9.00 3.33 1.66 4.00 3.33 1.48 1.00 5.00 4.00 -0.32 -1.74 0.55
11 Shoulder.fatigue.2 11 9.00 3.67 1.22 4.00 3.67 1.48 2.00 5.00 3.00 -0.16 -1.75 0.41
12 Neck.fatigue.2 12 9.00 4.33 1.00 5.00 4.33 0.00 2.00 5.00 3.00 -1.26 0.41 0.33
write.table(s, file = "tables/questionnaire-leapmotionhandgrab-summary.csv", sep=",", row.names=FALSE)

All users indicated that their favorite device was the mouse. Regarding the two gestures users answered:

s <- data[,c(1,50:53)]
smelted<-melt(s, id=c("ID"))
smelted$value <- factor(smelted$value)
levels(smelted$value) <- list( Mouse=c(), LeapMotionScreenTap=c("Touchless"), LeapMotionHandGrab=c("Grabbing") )
colnames(smelted)[2] = "Question"
colnames(smelted)[3] = "Gesture"
#s <- cbind(Device=rownames(s), s)

#put an "?" at the end, and replace "." with a space.
smelted$Question<-gsub("\\.$", "?", smelted$Question)
smelted$Question<-gsub("\\.", " ", smelted$Question)

smelted$Question<-gsub("Of the used gestures  which one did you", "", smelted$Question)

t <- as.data.frame.matrix(table(smelted[,2:3]))
t <- cbind(Question=rownames(t), t)
t = melt(t)
## Using Question as id variables
colnames(t)[2] = "Gesture"
levels(t$Gesture) <- list( Mouse=c(""), LeapMotionHandGrab=c("LeapMotionHandGrab"), LeapMotionScreenTap=c("LeapMotionScreenTap") )

t$l <- ifelse(t$Gesture=="LeapMotionScreenTap", as.character(t$Question), NA)
t$value <- 100*(t$value/9)


my.cols <- brewer.pal(5, "Set1")
my.cols

[1] “#E41A1C” “#377EB8” “#4DAF4A” “#984EA3” “#FF7F00”

ggplot(t, aes(x=Question, y=value, group=Gesture, colour=Gesture, fill=Gesture, label=l) ) + 
    #stat_summary(fun.y="mean", geom="bar") + 
    geom_bar(stat="identity", width=.5, position = position_dodge(width=0.5)) +
    geom_text(angle=70, colour="Black", y=1.05,
              hjust=0, size=4) + 
    #geom_bar() +
    #coord_flip() +
    coord_cartesian(ylim=c(0, 100.0)) +
    ylab("Percentage") +
    xlab("") +

    #facet_wrap(  ~ variable,ncol=3) +
    theme(legend.position="top", legend.direction="horizontal", 
          axis.text.x = element_blank()) + 
    scale_fill_manual(values = my.cols[2:5]) + 
    scale_colour_manual(values = my.cols[2:5])
## Warning: Removed 4 rows containing missing values (geom_text).

plot of chunk devicepreference

ggsave(file = "charts/questionnaire/gesture-preference.pdf", width=14/2.54, height=10/2.54, dpi=100)
## Warning: Removed 4 rows containing missing values (geom_text).
#####
m <- NULL
for (i in 10:21) {
  print(colnames(data)[i])
  c1 <- colnames(data)[i]
  c2 <- paste(c1,".1", sep="")
  c3 <- paste(c1,".2", sep="")

  m1 <- melt(data[,c("ID", c1, c2, c3)], id=c("ID"))
  colnames(m1) <- c("ID", "Device", c1) 
  levels(m1$Device) <- list( Mouse=c(c1),  LeapMotionHandGrab=c(c3), LeapMotionScreenTap=c(c2) )
  if ( is.null(m) ) {
    m <- m1
  } else{
    m<-cbind(m, c=m1[,c(c1)] )  
    colnames(m)[colnames(m) == "c"] <- c1
  }

}
## [1] "Force.required.for.actuation"
## [1] "Smoothness.during.operation"
## [1] "Effort.required.for.operation"
## [1] "Accuracy"
## [1] "Operation.Speed"
## [1] "General.comfort"
## [1] "Overall.operation.of.input.device"
## [1] "Finger.fatigue"
## [1] "Wrist.fatigue"
## [1] "Arm.fatigue"
## [1] "Shoulder.fatigue"
## [1] "Neck.fatigue"
m<-melt(m, id=c("ID", "Device"))


ggplot(m, aes(Device, value, colour=Device)) + 
  geom_boxplot() +
  #coord_flip() +
  facet_wrap(  ~ variable,ncol=3)

plot of chunk boxplots

ggsave(file = "charts/questionnaire/iso-boxplot.pdf", width=21/2.54, height=29/2.54, dpi=100)
describe <- describeBy(m$value, list(m$Device,m$variable), mat=TRUE)
colnames(describe)[colnames(describe)=="group1"] <- "Device"
colnames(describe)[colnames(describe)=="group2"] <- "variable"
#Reorder levels for chart
levels(describe$Device) <- list( Mouse=c("Mouse"),  LeapMotionHandGrab=c("LeapMotionHandGrab"), LeapMotionScreenTap=c("LeapMotionScreenTap"))



#dfc <- summarySE(m, measurevar="value", groupvars=c("Device","variable"))

ggplot(describe, aes(Device, mean, colour=Device, fill=Device)) + 
  #stat_summary(fun.y="mean", geom="bar") + 
 geom_bar(stat="identity") +
  #coord_flip() +
  geom_errorbar(aes(ymin=mean-1.96*se, ymax=mean+1.96*se), colour="Black",
               width=.2,                    # Width of the error bars
               position=position_dodge(.9)) +
  facet_wrap(  ~ variable,ncol=3) +
  theme(legend.position="top", 
        legend.direction="horizontal") 

plot of chunk barplot

ggsave(file = "charts/questionnaire/iso-barplot.pdf", width=16/2.54, height=20/2.54, dpi=100)
describe$l <- ifelse(describe$Device=="Mouse", as.character(describe$variable), NA)

ggplot(describe, aes(x=variable, y=mean, group=Device, colour=Device, fill=Device, label=l) ) + 
    #stat_summary(fun.y="mean", geom="bar") + 
    geom_bar(stat="identity", width=.5, position = position_dodge(width=0.5)) +
    geom_text(angle=70, colour="Black", y=1.05,
              hjust=0, size=4) + 
    #geom_bar() +
    #coord_flip() +
    coord_cartesian(ylim=c(1.0, 5.9)) +
    ylab("Average score") +
    xlab("") +
    geom_errorbar(aes(ymin=mean-1.96*se, ymax=mean+1.96*se), colour="Black",
                  width=.2,                    # Width of the error bars
                  size = .1,
                  position=position_dodge(.5)) +
    #facet_wrap(  ~ variable,ncol=3) +
    theme(legend.position=c(.5,-0.1), legend.direction="horizontal", 
          axis.text.x = element_blank()) + 
    scale_fill_brewer(palette="Set1") + 
    scale_colour_brewer(palette="Set1")
## Warning: Removed 24 rows containing missing values (geom_text).

plot of chunk barplotall

    ggsave(file = "charts/questionnaire/iso-barplot-side.pdf", width=30/2.54, height=7/2.54, dpi=100)
## Warning: Removed 24 rows containing missing values (geom_text).