true
## 
## 载入程序包:'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union

HW2 Data Analysis part 1-Table of Contents:

1.What are the impacts of button size and spacing on user performance (time and error) for the younger and the older participants? Are the impacts different for different age groups? Is there any interaction effect?

2.What are the impacts of button size and spacing on satisfaction for the younger and the older participants? Are the impacts similar or different for different age groups? Is there any interaction effect?

3.What is the impact of touchscreen type on user performance for the younger and the older participants? Does it moderate the effect of button size and spacing? If yes, does the moderator effect differ across age groups?

4.What is the impact of inclination angle on performance and satisfaction for the younger and the older participants? Does it moderate the effect of button size and spacing? If yes, does the moderator effect differ across age groups?

Button size and spacing on younger user performance:

## New names:
## New names:
## • `SAT13` -> `SAT13...17`
## • `SAT41` -> `SAT41...22`
## • `SAT13` -> `SAT13...47`
## • `SAT41` -> `SAT41...67`
## # A tibble: 6 × 6
##   SAT11 SAT12 SAT13...47 SAT22 SAT42 SAT32
##   <dbl> <dbl>      <dbl> <dbl> <dbl> <dbl>
## 1     2     4          4     5     4     4
## 2     2     4          4     4     4     4
## 3     4     5          5     5     5     5
## 4     1     4          5     4     3     3
## 5     1     4          4     1     1     5
## 6     1     1          5     5     5     5
#Average Time of Button 1 Sound+Light"

mT_button1 <- data.frame(mTS11+mTL11, mTS12+mTL12,mTS13+mTL13,mTS14+mTL14)

v <- c( 20.72866,17.0403,14.64578,16.09593)
plot(v, type = "o", col = "green",
    xlab = "Space(1-4)", ylab = "Performance Time(light + Sound(sec))",
    main = "Fig.1 Average Time of Button 1 Sound+Light")

#Average Time of Button 2 Sound+Light

mT_button2 <- data.frame(mTS21+mTL21, mTS22+mTL22,mTS23+mTL23,mTS24+mTL24) 


t <- c(13.27148,11.58227,10.62252,10.95365)
plot(t, type = "o", col = "red",
    xlab = "Space(1-4)", ylab = "Performance Timelight + Sound(sec))",
    main = "Fig.2 Average Time of Button 2 Sound+Light")

#Average Time of Button 3 Sound+LighT

mT_button3 <- data.frame(mTS31+mTL31, mTS32+mTL32,mTS33+mTL33,mTS34+mTL34)


u <- c(11.36903,9.561775,9.690175,9.6462)
plot(u, type = "o", col = "blue",
    xlab = "Space(1-4)", ylab = "Performance Time(light + Sound)",
    main = "Fig.3 Average Time of Button 3 Sound+Light")

#Average Time of Button 4 Sound+Light

mT_button4 <- data.frame(mTS41+mTL41, mTS42+mTL42,mTS43+mTL43,mTS44+mTL44)


k <- c(9.72195, 8.95955,9.1273,8.888375)
plot(k, type = "o", col = "pink",
    xlab = "Space(1-4)", ylab = "Performance Time(light + Sound(sec))",
    main = "Fig.4 Average Time of Button 4 Sound+Light")

affect of button size on performance speed

Aside from space number 1, spacing did not have a significant impact on performance speed

##   mTS11...mTL11 mTS12...mTL12 mTS13...mTL13 mTS14...mTL14  Space 1 Space 2
## 1      20.72866       17.0403      14.64578      16.09593 20.72866 17.0403
##    Space 3 Space 4
## 1 14.64578 16.0318
##   mTS21...mTL21 mTS22...mTL22 mTS23...mTL23 mTS24...mTL24  Space 1  Space 2
## 1      13.27148      11.58227      10.62252      10.95365 13.27148 11.58227
##    Space 3  Space 4
## 1 10.62252 10.95365
##   mTS31...mTL31 mTS32...mTL32 mTS33...mTL33 mTS34...mTL34  Space 1  Space 2
## 1      11.36903      9.561775      9.690175        9.6462 11.36903 9.561775
##    Space 3 Space 4
## 1 9.690175  9.6462
## [1] "Average Time of Button 3 Sound"
## [1] "Average Time of Button 4 Sound"

effect of Different button size on performance speed(Sound)

Size of the button is positively correlated to decrease in total time.

"Average Time of space 1"
## [1] "Average Time of space 1"
mT_space1 <- data.frame(mTS11+mTL11, mTS21+mTL21,mTS31+mTL31,mTS41+mTL41)


e <- c(20.72866,13.27148,11.36903,9.72195)
plot(e, type = "o", col = "pink",
    xlab = "Button size(1-4)", ylab = "Performance Time light + Sound(sec) ",
    main = "Fig.5 Average Time of Space 1 Sound+Light")

"Average Time of space 2"
## [1] "Average Time of space 2"
mT_space2 <- data.frame(mTS12+mTL12, mTS22+mTL22,mTS32+mTL32,mTS42+mTL42)


f <- c(17.0403, 11.58227, 9.561775, 8.95955)
plot(f, type = "o", col = "yellow",
    xlab = "Button size(1-4)", ylab = "Performance Time light + Sound (sec)",
    main = "Fig. 6 Average Time of Space 2 Sound+Light")

"Average Time of space 3"
## [1] "Average Time of space 3"
mT_space3 <- data.frame(mTS13+mTL13, mTS23+mTL23,mTS33+mTL33,mTS43+mTL43)


g <- c(14.64578,10.62252,9.690175,9.1273)
plot(g, type = "o", col = "orange",
    xlab = "Button size(1-4)", ylab = "Performance Time light + Sound(sec))",
    main = "Fig. 7 Average Time of Space 3 Sound+Light")

"Average Time of space 4"
## [1] "Average Time of space 4"
mT_space4 <- data.frame(mTS14+mTL14, mTS24+mTL24,mTS34+mTL34,mTS44+mTL44)
head(mT_space4)
##   mTS14...mTL14 mTS24...mTL24 mTS34...mTL34 mTS44...mTL44
## 1      16.09593      10.95365        9.6462      8.888375
h <- c(16.09593, 10.95365, 9.6462, 8.888375)
plot(h, type = "o", col = "magenta",
    xlab = "Button size(1-4)", ylab = "Performance Timelight + Sound(sec))",
    main = "Fig. 8 Average Time of Space 4 Sound+Light")

#AVERAGE MISTAKES SOUND + LIGHT

##   mMS11...mML11...mMS21...mML21...mMS31...mML31...mMS41...mML41
## 1                                                          25.2
##   mMS12...mML12...mMS22...mML22...mMS32...mML32...mMS42...mML42
## 1                                                          4.95
##   mMS13...mML13...mMS23...mML23...mMS33...mML33...mMS43...mML43
## 1                                                         2.475
##   mMS14...mML14...mMS24...mML24...mMS34...mMS34...mMS44...mML44
## 1                                                         1.275
##   mMS11...mML11...mMS12...mML12...mMS13...mML13...mMS14...mML14
## 1                                                         11.35
##   mMS21...mML21...mMS22...mML22...mMS23...mML23...mMS24...mML24
## 1                                                           8.7
##   mMS31...mML31...mMS32...mML32...mMS33...mML33...mMS34...mMS34
## 1                                                         6.275
##   mMS41...mML41...mMS42...mML42...mMS43...mML43...mMS44...mML44
## 1                                                         7.575
# Effect of Button size and Spacing on performance mistakes"
a <- c(20.72866,17.0403,14.64578,16.09593)
b <- c(13.27148,11.58227,10.62252,10.95365)
c <- c(11.36903,9.561775,9.690175,9.6462)
d <- c(9.72195, 8.95955,9.1273,8.888375)
e <- c(20.72866,13.27148,11.36903,9.72195)
f <- c(17.0403, 11.58227, 9.561775, 8.95955)
g <- c(14.64578,10.62252,9.690175,9.1273)
h <- c(16.09593, 10.95365, 9.6462, 8.888375)
i <- c(25.2, 4.95, 2.475,1.275)
j <- c(11.35, 8.7, 6.275,7.575)
# Plot the bar chart.
plot(v, type = "o", col = "red",
    xlab = "Space(abcd/Button(efgh)", ylab = " a-h= performance time (sec) i= mistakes SPACE #, j=mistakes BUTTONS # ",
    main = "Fig. 9 Effect of Button size and Spacing on performance mistakes")

lines(a, type = "o", col = "purple")
lines(b, type = "o", col = "cyan")
lines(c, type = "o", col = "black")
lines(d, type = "o", col = "gold")
lines(e, type = "o", col = "pink")
lines(f, type = "o", col = "orange")
lines(g, type = "o", col = "red")
lines(h, type = "o", col = "green")
lines(i, type = "o", col = "blue")
lines(j, type = "o", col = "magenta")

#a = "purple"
#b = "cyan"
#c = "black"
#d = "gold"
#e = "pink"
#f = "orange"
#g = "red"
#h = "green"
#i = "blue"
#j = "magenta"

data <- select(youthwhole, TS11, TS21,TS32,TS42,SAT11,SAT21,SAT32)
ggplot(data, aes(x=TS11, TS21,TS32,TS42, y=SAT11,SAT21,SAT32)) +
       geom_bar(stat = "identity") + 
       labs(x="button time", y="satisfication")
## Warning: Duplicated aesthetics after name standardisation:

# HW2 Data Analysis answers

  1. As expected, error and performance time both increased when space increased, and button size decreased, however, space did not have as much of an impact as button size.The impacts showed a similar trend amoung younger and older partcipants (see figures 1-8) An interesting interaction event is that amoung younger individuals, women tended to have better times than men, while the opposite was true for Elders.Another interesting observation was that spacing, while had some effect on time and accuraccy at the widest spacing(4) and smallest button(1) was not significantly different in the other groups.

  2. Rather than look at button size and spacing specifically, I examined amount of performance time. As expected, higher performance times led to lower satisfication, in both younger and older individuals, however, strangely, the second fastests times reported higher satisfication than those who performed the quickest. Women of both age groups reported higher satidfaction scores.

  3. Elders performed better on non touch screens and younger individuals performed better on touchscreen, consistent with prior expectations.

4.Inclined sceens did not have an effect on older individuals but it did have some effect for younger participants. In Some younger participants,inclined screens somewhat improved performance speed in reduced error in button size.