We measured Accuracy and Euclidean Error from the experiment. The following R codes will illustrate the details of our quantitative analysis.
'data.frame': 320 obs. of 7 variables:
$ PID : Factor w/ 16 levels "1","2","3","4",..: 16 16 16 16 16 16 16 16 16 16 ...
$ Condition : Factor w/ 4 levels "Furniture-Irregular",..: 3 3 3 3 3 1 1 1 1 1 ...
$ Furniture : Factor w/ 2 levels "Furniture","NoFurniture": 2 2 2 2 2 1 1 1 1 1 ...
$ Layout : Factor w/ 2 levels "Irregular","Regular": 1 1 1 1 1 1 1 1 1 1 ...
$ Accuracy : num 1 1 1 0.8 0.8 1 1 1 1 1 ...
$ EuclideanError: num 0 0 0 0.6 0.765 ...
$ LearningTime : num 16.9 18.5 15 15 15 ...
PID Condition Furniture Layout Accuracy EuclideanError LearningTime
1 : 20 Furniture-Irregular :80 Furniture :160 Irregular:160 Min. :0.0000 Min. :0.000 Min. :15.00
2 : 20 Furniture-Regular :80 NoFurniture:160 Regular :160 1st Qu.:0.2000 1st Qu.:0.600 1st Qu.:15.06
3 : 20 NoFurniture-Irregular:80 Median :0.4000 Median :2.000 Median :17.34
4 : 20 NoFurniture-Regular :80 Mean :0.5269 Mean :2.167 Mean :20.87
5 : 20 3rd Qu.:0.8000 3rd Qu.:3.540 3rd Qu.:23.18
6 : 20 Max. :1.0000 Max. :7.092 Max. :78.00
(Other):200
By checking the raw data, we can see all 320 observations (16 participants * 2 Furniture conditions * 2 Layout conditions * 5 repetitions). We have one independent variable (condition), which can be further split into two independent variables (Furniture and Layout). We also have two dependent variables (Accuracy and Euclidean Error). At the end, we have tahe learning time recorded to see if any experiment trials are outliers.
From the boxplots, we can see that Accuracy and Euclidean Error data have no outlier, but the Learning Time data have outliers. We will need to exclude those outliers which imply that participant didn’t follow the experimental rule in those trials.
Q <- quantile(data.accuracy.raw$LearningTime, probs=c(.25, .75), na.rm = FALSE)
iqr <- IQR(data.accuracy.raw$LearningTime)
up <- Q[2]+1.5*iqr # Upper Range
outliers <- subset(data.accuracy.raw, data.accuracy.raw$LearningTime >= up)
outliersWe found 19 trials where participants spent more than expected time (> 35.3s) during the learning phase, causing the data not valid. We then remove those 19 trials from the raw data.
data.accuracy.eliminated <- subset(data.accuracy.raw, data.accuracy.raw$LearningTime < up)
str(data.accuracy.eliminated)'data.frame': 301 obs. of 7 variables:
$ PID : Factor w/ 16 levels "1","2","3","4",..: 16 16 16 16 16 16 16 16 16 16 ...
$ Condition : Factor w/ 4 levels "Furniture-Irregular",..: 3 3 3 3 3 1 1 1 1 1 ...
$ Furniture : Factor w/ 2 levels "Furniture","NoFurniture": 2 2 2 2 2 1 1 1 1 1 ...
$ Layout : Factor w/ 2 levels "Irregular","Regular": 1 1 1 1 1 1 1 1 1 1 ...
$ Accuracy : num 1 1 1 0.8 0.8 1 1 1 1 1 ...
$ EuclideanError: num 0 0 0 0.6 0.765 ...
$ LearningTime : num 16.9 18.5 15 15 15 ...
PID Condition Furniture Layout Accuracy EuclideanError LearningTime
1 : 20 Furniture-Irregular :76 Furniture :148 Irregular:154 Min. :0.0000 Min. :0.000 Min. :15.00
3 : 20 Furniture-Regular :72 NoFurniture:153 Regular :147 1st Qu.:0.2000 1st Qu.:0.600 1st Qu.:15.06
4 : 20 NoFurniture-Irregular:78 Median :0.6000 Median :2.000 Median :16.94
8 : 20 NoFurniture-Regular :75 Mean :0.5322 Mean :2.154 Mean :19.20
10 : 20 3rd Qu.:0.8000 3rd Qu.:3.536 3rd Qu.:21.90
16 : 20 Max. :1.0000 Max. :7.092 Max. :34.22
(Other):181
After removing, we have 301 observations left for further analysis.
PID Condition Furniture Layout Accuracy EuclideanError
1 : 4 Furniture-Irregular :16 Furniture :32 Irregular:32 Min. :0.1500 Min. :0.000
2 : 4 Furniture-Regular :16 NoFurniture:32 Regular :32 1st Qu.:0.3200 1st Qu.:1.225
3 : 4 NoFurniture-Irregular:16 Median :0.4800 Median :2.393
4 : 4 NoFurniture-Regular :16 Mean :0.5361 Mean :2.137
5 : 4 3rd Qu.:0.7200 3rd Qu.:3.069
6 : 4 Max. :1.0000 Max. :4.848
(Other):40
Now, we have the aggregated dataset which contains the mean accuracy and euclidean error for each participant on each condition. Next, we will do some statistical analysis on this dataset.
Shapiro-Wilk normality test
data: data.accuracy$Accuracy
W = 0.93801, p-value = 0.00307
Shapiro-Wilk normality test
data: data.accuracy$EuclideanError
W = 0.95174, p-value = 0.01395
We can clearly see from the result that p values are all < 0.05, which means that the data of two dependent variables are not normally distributed. So we use ARTools to transform the data for different measurements. Below, we have separate sections for each accuracy measurements: Accuracy and Euclidean Error.
The Normal Accuracy is calculated by the number of correct cards / 5. The correct card is measured if the user selected card matches the exact pattern card.
art.accuracy <- art(Accuracy ~ Furniture * Layout + Error(PID), data = data.accuracy)
art.accuracy.condition <- art(Accuracy ~ Condition + Error(PID), data = data.accuracy)
art.accuracy.furniture <- art(Accuracy ~ Furniture + Error(PID), data = data.accuracy)
art.accuracy.layout <- art(Accuracy ~ Layout + Error(PID), data = data.accuracy)Now, we have four sub-models transformed by ARTools from the original data set for normal accuracy.
Bartlett test of homogeneity of variances
data: Accuracy by interaction(Furniture, Layout)
Bartlett's K-squared = 1.0745, df = 3, p-value = 0.7832
From the output, it can be seen that the p-value of 0.7832 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Accuracy is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.accuracy <- anova(art.accuracy)
model.accuracy$part.eta.sq = with(model.accuracy, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.accuracyAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Accuracy)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 4.46975 0.040074 0.090353 *
2 Layout Withn 1 45 2.40613 0.127866 0.050756
3 Furniture:Layout Withn 1 45 0.15031 0.700070 0.003329
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the two-way repeated measures ANOVA results above, we can see that only furniture has the significant main effect (p < 0.05). The effect size 0.09 is calculated using partial eta-squared, which implies a medium effect (0.06-0.14).
Bartlett test of homogeneity of variances
data: Accuracy by Furniture
Bartlett's K-squared = 0.7984, df = 1, p-value = 0.3716
From the output, it can be seen that the p-value of 0.3716 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Accuracy is statistically significantly different among different Furniture conditions. Thus, we can assume the homogenity.
model.accuracy.furniture <- anova(art.accuracy.furniture)
model.accuracy.furniture$part.eta.sq = with(model.accuracy.furniture, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.accuracy.furnitureAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Accuracy)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 47 4.7097 0.035079 0.09108 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the one-way repeated measures ANOVA results above, we can see that furniture has the significant main effect (p < 0.05). The effect size 0.09 is calculated using partial eta-squared, which implies a medium effect (0.06-0.14).
Balanced one-way analysis of variance power calculation
k = 2
n = 32
f = 0.3165546
sig.level = 0.05
power = 0.7030161
NOTE: n is number in each group
A Post-hoc power calculations for balanced ANOVA test was conducted to determine the power of our tested study hypothesis, which compared Furniture to No Furniture conditions. The effect size of the study is 0.09 (partial eta-squared)/0.32 (Cohen’s f) with 32 observations in two groups. The calculated power is 0.7.
Bartlett test of homogeneity of variances
data: Accuracy by Layout
Bartlett's K-squared = 0.066248, df = 1, p-value = 0.7969
From the output, it can be seen that the p-value of 0.7969 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Accuracy is statistically significantly different among different Layout conditions. Thus, we can assume the homogenity.
model.accuracy.layout<- anova(art.accuracy.layout)
model.accuracy.layout$part.eta.sq = with(model.accuracy.layout, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.accuracy.layoutAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Accuracy)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Layout Withn 1 47 2.0974 0.15419 0.042718
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the one-way repeated measures ANOVA results above, we cannot find any significant main effect for the layout factor (p = 0.15).
Bartlett test of homogeneity of variances
data: Accuracy by Condition
Bartlett's K-squared = 1.0745, df = 3, p-value = 0.7832
From the output, it can be seen that the p-value of 0.7832 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in accuracy is statistically significantly different among different conditions. Thus, we can assume the homogenity.
model.accuracy.condition <- anova(art.accuracy.condition)
model.accuracy.condition$part.eta.sq = with(model.accuracy.condition, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.accuracy.conditionAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Accuracy)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Condition Withn 3 45 2.3266 0.087353 0.13428 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the one-way repeated measures ANOVA results above, we cannot find a strong significant main effect among the four conditions (p = 0.08).
d <- Rmisc::summarySE(data.accuracy, measurevar = "Accuracy", groupvars = c("Condition"))
ggplot(d, aes(x = Condition, y = Accuracy, fill = Condition)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Accuracy-ci, ymax=Accuracy+ci)) + scale_fill_manual(values=c("#e41a1c", "#377eb8", "#984ea3", "#ff7f00"))The Euclidean Distance provides a secondary evaluation of the error measure. Whereas Cards Incorrect provides an absolute measure, Euclidean Distance rewards card selections by summing the distance from the selected cards to the correct ones via the Hungarian Algorithm.
art.ee <- art(EuclideanError ~ Furniture * Layout + Error(PID), data = data.accuracy)
art.ee.furniture <- art(EuclideanError ~ Furniture + Error(PID), data = data.accuracy)
art.ee.layout <- art(EuclideanError ~ Layout + Error(PID), data = data.accuracy)
art.ee.condition <- art(EuclideanError ~ Condition + Error(PID), data = data.accuracy)Now, we have four sub-models transformed by ARTools from the original data set for Euclidean Distance.
Bartlett test of homogeneity of variances
data: EuclideanError by interaction(Furniture, Layout)
Bartlett's K-squared = 3.7551, df = 3, p-value = 0.2891
From the output, it can be seen that the p-value of 0.2891 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Euclidean Distance is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.ee <- anova(art.ee)
model.ee$part.eta.sq = with(model.ee, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.eeAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(EuclideanError)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 1.99248680 0.16496 4.2400e-02
2 Layout Withn 1 45 0.00031774 0.98586 7.0609e-06
3 Furniture:Layout Withn 1 45 0.15327234 0.69728 3.3945e-03
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the two-way repeated measures ANOVA results above, we cannot find any evidence to suggest a significant difference for any factors or combinations of factors.
Bartlett test of homogeneity of variances
data: EuclideanError by Furniture
Bartlett's K-squared = 2.8296, df = 1, p-value = 0.09254
From the output, it can be seen that the p-value of 0.09254 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Euclidean Distance is statistically significantly different among different Furniture conditions. Thus, we can assume the homogenity.
model.ee.furniture <- anova(art.ee.furniture)
model.ee.furniture$part.eta.sq = with(model.ee.furniture, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.ee.furnitureAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(EuclideanError)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 47 1.965 0.16755 0.04013
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the one-way repeated measures ANOVA results above, we cannot find any significant main effect for the Furniture factor (p = 0.17).
Bartlett test of homogeneity of variances
data: EuclideanError by Layout
Bartlett's K-squared = 0.43863, df = 1, p-value = 0.5078
From the output, it can be seen that the p-value of 0.5078 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Euclidean Distance is statistically significantly different among different Layout conditions. Thus, we can assume the homogenity.
model.ee.layout<- anova(art.ee.layout)
model.ee.layout$part.eta.sq = with(model.ee.layout, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.ee.layoutAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(EuclideanError)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Layout Withn 1 47 0.0050904 0.94342 0.0001083
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the one-way repeated measures ANOVA results above, we cannot find any significant main effect for the layout factor (p = 0.94).
Bartlett test of homogeneity of variances
data: EuclideanError by Condition
Bartlett's K-squared = 3.7551, df = 3, p-value = 0.2891
From the output, it can be seen that the p-value of 0.2891 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Euclidean Distance is statistically significantly different among different conditions. Thus, we can assume the homogenity.
model.ee.condition <- anova(art.ee.condition)
model.ee.condition$part.eta.sq = with(model.ee.condition, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.ee.conditionAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(EuclideanError)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Condition Withn 3 45 0.6608 0.58049 0.042195
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the one-way repeated measures ANOVA results above, we cannot find a strong significant main effect among the four conditions (p = 0.58).
d <- Rmisc::summarySE(data.accuracy, measurevar = "EuclideanError", groupvars = c("Condition"))
ggplot(d, aes(x = Condition, y = EuclideanError, fill = Condition)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=EuclideanError-ci, ymax=EuclideanError+ci)) + scale_fill_manual(values=c("#e41a1c", "#377eb8", "#984ea3", "#ff7f00"))
Shapiro-Wilk normality test
data: data.accuracy.female$Accuracy
W = 0.94031, p-value = 0.07641
Shapiro-Wilk normality test
data: data.accuracy.male$Accuracy
W = 0.91875, p-value = 0.01923
Shapiro-Wilk normality test
data: data.accuracy.female$EuclideanError
W = 0.93576, p-value = 0.05681
Shapiro-Wilk normality test
data: data.accuracy.male$EuclideanError
W = 0.95309, p-value = 0.1763
Not all data are normally distributed, so we use non-parametric test.
Warning: cannot compute exact p-value with ties
Wilcoxon signed rank test with continuity correction
data: data.accuracy.female$Accuracy and data.accuracy.male$Accuracy
V = 293.5, p-value = 0.5875
alternative hypothesis: true location shift is not equal to 0
Wilcoxon signed rank exact test
data: data.accuracy.female$EuclideanError and data.accuracy.male$EuclideanError
V = 236, p-value = 0.6117
alternative hypothesis: true location shift is not equal to 0
The data for the normal accuracy are not normally distributed. So we use the Aligned Rank Transform (ART) to transform our non-parametric data and turn them into ANOVA models. The data meet the assumption of homogeneity of variances. The one-way repeated measures ANOVA test shows a significant effect of the Furniture factor (p=0.035, effect size eta-squared=0.09) with a higher accuracy for Furniture condition (mean=0.57, sd=0.27) vs No Furniture condition (mean=0.50, sd=0.23). We don’t find any evidence to suggest that the Layout factor has a main effect. Also, we don’t find any evidence to suggest that the four conditions are significantly different.
The data for the Euclidean Distance are not normally distributed. So we use the Aligned Rank Transform (ART) to transform our non-parametric data and turn them into ANOVA models. The data meet the assumption of homogeneity of variances. Our results show that there is no evidence to suggest that Euclidean Distance measure is significant difference for any factor or combination of factors.
data.accuracy.female$Gender <- "Female"
data.accuracy.male$Gender <- "Male"
data.gender.combination <- rbind(data.accuracy.female, data.accuracy.male)
d1 <- Rmisc::summarySE(data.gender.combination, measurevar = "Accuracy", groupvars = c("Gender"))
d1ggplot(d1, aes(x = Gender, y = Accuracy, fill = Gender)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Accuracy-ci, ymax=Accuracy+ci)) + scale_fill_manual(values=c("#d95f02", "#1b9e77"))
d2 <- Rmisc::summarySE(data.gender.combination, measurevar = "EuclideanError", groupvars = c("Gender"))
d2ggplot(d2, aes(x = Gender, y = EuclideanError, fill = Gender)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=EuclideanError-ci, ymax=EuclideanError+ci)) + scale_fill_manual(values=c("#d95f02", "#1b9e77"))From the statistical analysis, we couldn’t find any evidence for a significant effect of different gender on accuracy data. Female participants have slightly higher accuracy (mean=0.56, sd=0.24) than male participants (mean=0.51, sd=0.26). Female participants also have slightly lower Euclidean Error (mean=2.04, sd=1.2) than male participants (mean=2.23, sd=1.31).
Timestamp PID Mental Physical Temporal Performance Effort Frustration
Length:64 1 : 4 Min. :1.000 Min. :1.00 Min. :1.000 Min. :2.000 Min. :1.000 Min. :1.000
Class :character 2 : 4 1st Qu.:3.000 1st Qu.:3.00 1st Qu.:4.000 1st Qu.:4.000 1st Qu.:3.000 1st Qu.:2.000
Mode :character 3 : 4 Median :5.000 Median :5.00 Median :5.500 Median :5.000 Median :5.000 Median :3.500
4 : 4 Mean :4.656 Mean :4.25 Mean :5.109 Mean :4.656 Mean :4.656 Mean :3.516
5 : 4 3rd Qu.:6.000 3rd Qu.:5.25 3rd Qu.:6.000 3rd Qu.:6.000 3rd Qu.:6.000 3rd Qu.:5.000
6 : 4 Max. :7.000 Max. :7.00 Max. :7.000 Max. :7.000 Max. :7.000 Max. :7.000
(Other):40
Mean Condition Furniture Layout
Min. :1.333 Furniture-Irregular :16 Furniture :32 Irregular:32
1st Qu.:3.958 Furniture-Regular :16 NoFurniture:32 Regular :32
Median :4.667 NoFurniture-Irregular:16
Mean :4.474 NoFurniture-Regular :16
3rd Qu.:5.167
Max. :6.833
Because we have six dimensions (Mental, Physical, Temporal, Performance, Effort, Frustration) and the mean value from the NASA-TLX questionnaire. We separate them into different sections to analyse.
Shapiro-Wilk normality test
data: data.subjective$Mental
W = 0.89604, p-value = 5.693e-05
p < 0.01, NASA-TLX Mental Demands data are not normally distributed. So we use ARTools to transform the data for multi-factor analysis. And then we use Friedman tests for single factor analysis.
We first check the homogenity using bartlett’s test.
Bartlett test of homogeneity of variances
data: Mental by interaction(Furniture, Layout)
Bartlett's K-squared = 0.074499, df = 3, p-value = 0.9947
From the output, it can be seen that the p-value of 0.9947 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in mental demands is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.m.both <- anova(art.m.both)
model.m.both$part.eta.sq = with(model.m.both, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.m.bothAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Mental)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 18.05672 0.00010645 0.2863567 ***
2 Layout Withn 1 45 0.60417 0.44105949 0.0132481
3 Furniture:Layout Withn 1 45 0.36156 0.55066004 0.0079706
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the output, it can be seen that we have significant main effects of Furniture (p < 0.05) with an effect size partial eta-squared 0.29. The effect size can be interpreted as a large effect (eta-squared >= 0.14).
Then, we use Friedman’s test to analyse the furniture factor.
data.mental.furniture <- data.subjective %>% dplyr::group_by(PID, Furniture) %>% dplyr::summarise(Mental = mean(Mental), .groups = "drop")
friedman.test(y=data.mental.furniture$Mental, groups=data.mental.furniture$Furniture, blocks=data.mental.furniture$PID)
Friedman rank sum test
data: data.mental.furniture$Mental, data.mental.furniture$Furniture and data.mental.furniture$PID
Friedman chi-squared = 5.3333, df = 1, p-value = 0.02092
A Friedman’s test revealed a significant effect of Furniture factor on Mental Demands (chi-squared = 5.3, p < 0.05).
data.mental.furniture <- as.data.frame(data.mental.furniture)
data.mental.furniture %>% friedman_effsize(Mental ~ Furniture | PID)The effect size (Kendall’s W) for Furniture is 0.33. It implies a moderate effect size.
Then, we use Friedman’s test to analyse the layout factor.
data.mental.layout <- data.subjective %>% dplyr::group_by(PID, Layout) %>% dplyr::summarise(Mental = mean(Mental), .groups = "drop")
friedman.test(y=data.mental.layout$Mental, groups=data.mental.layout$Layout, blocks=data.mental.layout$PID)
Friedman rank sum test
data: data.mental.layout$Mental, data.mental.layout$Layout and data.mental.layout$PID
Friedman chi-squared = 0.090909, df = 1, p-value = 0.763
From the output, it can be seen that the p value is 0.76 which is more than 0.05. It means that there is no evidence to suggest that the mental demands is statistically significantly different among different layouts.
Then, we use Friedman’s test to analyse the four conditions.
data.mental.condition <- data.subjective %>% dplyr::group_by(PID, Condition) %>% dplyr::summarise(Mental = mean(Mental), .groups = "drop")
friedman.test(y=data.mental.condition$Mental, groups=data.mental.condition$Condition, blocks=data.mental.condition$PID)
Friedman rank sum test
data: data.mental.condition$Mental, data.mental.condition$Condition and data.mental.condition$PID
Friedman chi-squared = 11.763, df = 3, p-value = 0.00824
A Friedman’s test revealed a significant effect of four conditions on Mental Demands (chi-squared = 11.8, p < 0.01).
data.mental.condition <- as.data.frame(data.mental.condition)
data.mental.condition %>% friedman_effsize(Mental ~ Condition | PID)The effect size (Kendall’s W) is 0.25. It implies a small effect size.
pairwise.wilcox.test(data.mental.condition$Mental, data.mental.condition$Condition, p.adj="bonferroni", exact=F, paired=T)
Pairwise comparisons using Wilcoxon signed rank test with continuity correction
data: data.mental.condition$Mental and data.mental.condition$Condition
Furniture-Irregular Furniture-Regular NoFurniture-Irregular
Furniture-Regular 1.000 - -
NoFurniture-Irregular 0.189 0.047 -
NoFurniture-Regular 0.199 0.081 1.000
P value adjustment method: bonferroni
wilcox_test(Mental ~ factor(Condition), data=data.mental.condition[data.mental.condition$Condition=="Furniture-Regular"|data.mental.condition$Condition=="NoFurniture-Irregular",], distribution="exact")
Exact Wilcoxon-Mann-Whitney Test
data: Mental by factor(Condition) (Furniture-Regular, NoFurniture-Irregular)
Z = -1.951, p-value = 0.05095
alternative hypothesis: true mu is not equal to 0
[1] 0.3448913
A post-hoc test using Wilcoxon tests with Bonferroni correction showed the significant differences between Condition “Furniture-Regular” and “NoFurniture-Irregular” (p < 0.05, r = 0.34).
Shapiro-Wilk normality test
data: data.subjective$Physical
W = 0.92495, p-value = 0.0008049
p < 0.01, NASA-TLX Physical Demands data are not normally distributed. So we use ARTools to transform the data for multi-factor analysis. And then we use Friedman tests for single factor analysis.
We first check the homogenity using bartlett’s test.
Bartlett test of homogeneity of variances
data: Physical by interaction(Furniture, Layout)
Bartlett's K-squared = 0.31913, df = 3, p-value = 0.9564
From the output, it can be seen that the p-value of 0.9564 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Physical demands is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.p.both <- anova(art.p.both)
model.p.both$part.eta.sq = with(model.p.both, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.p.bothAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Physical)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 5.17926 0.027669 0.103215 *
2 Layout Withn 1 45 3.85073 0.055926 0.078826 .
3 Furniture:Layout Withn 1 45 0.87004 0.355921 0.018968
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the output, it can be seen that we have significant main effects of Furniture (p < 0.05) with an effect size partial eta-squared 0.1. The effect size can be interpreted as a medium effect (0.06 - 0.14).
Then, we use Friedman’s test to analyse the furniture factor.
data.physical.furniture <- data.subjective %>% dplyr::group_by(PID, Furniture) %>% dplyr::summarise(Physical = mean(Physical), .groups = "drop")
friedman.test(y=data.physical.furniture$Physical, groups=data.physical.furniture$Furniture, blocks=data.physical.furniture$PID)
Friedman rank sum test
data: data.physical.furniture$Physical, data.physical.furniture$Furniture and data.physical.furniture$PID
Friedman chi-squared = 7.3636, df = 1, p-value = 0.006656
A Friedman’s test revealed a significant effect of Furniture factor on Physical Demands (chi-squared = 5.3, p < 0.01).
data.physical.furniture <- as.data.frame(data.physical.furniture)
data.physical.furniture %>% friedman_effsize(Physical ~ Furniture | PID)The effect size (Kendall’s W) for Furniture is 0.46. It implies a moderate effect size.
Then, we use Friedman’s test to analyse the layout factor.
data.physical.layout <- data.subjective %>% dplyr::group_by(PID, Layout) %>% dplyr::summarise(Physical = mean(Physical), .groups = "drop")
friedman.test(y=data.physical.layout$Physical, groups=data.physical.layout$Layout, blocks=data.physical.layout$PID)
Friedman rank sum test
data: data.physical.layout$Physical, data.physical.layout$Layout and data.physical.layout$PID
Friedman chi-squared = 0.69231, df = 1, p-value = 0.4054
From the output, it can be seen that the p value is 0.4 which is more than 0.05. It means that there is no evidence to suggest that the physical demands is statistically significantly different among different layouts.
Then, we use Friedman’s test to analyse the four conditions.
data.physical.condition <- data.subjective %>% dplyr::group_by(PID, Condition) %>% dplyr::summarise(Physical = mean(Physical), .groups = "drop")
friedman.test(y=data.physical.condition$Physical, groups=data.physical.condition$Condition, blocks=data.physical.condition$PID)
Friedman rank sum test
data: data.physical.condition$Physical, data.physical.condition$Condition and data.physical.condition$PID
Friedman chi-squared = 10.216, df = 3, p-value = 0.01681
A Friedman’s test revealed a significant effect of four conditions on Physical Demands (chi-squared = 10.2, p < 0.05).
data.physical.condition <- as.data.frame(data.physical.condition)
data.physical.condition %>% friedman_effsize(Physical ~ Condition | PID)The effect size (Kendall’s W) is 0.21. It implies a small effect size.
pairwise.wilcox.test(data.physical.condition$Physical, data.physical.condition$Condition, p.adj="bonferroni", exact=F, paired=T)
Pairwise comparisons using Wilcoxon signed rank test with continuity correction
data: data.physical.condition$Physical and data.physical.condition$Condition
Furniture-Irregular Furniture-Regular NoFurniture-Irregular
Furniture-Regular 1.000 - -
NoFurniture-Irregular 0.112 0.033 -
NoFurniture-Regular 1.000 0.584 0.509
P value adjustment method: bonferroni
wilcox_test(Physical ~ factor(Condition), data=data.physical.condition[data.physical.condition$Condition=="Furniture-Regular"|data.physical.condition$Condition=="NoFurniture-Irregular",], distribution="exact")
Exact Wilcoxon-Mann-Whitney Test
data: Physical by factor(Condition) (Furniture-Regular, NoFurniture-Irregular)
Z = -1.7983, p-value = 0.0723
alternative hypothesis: true mu is not equal to 0
[1] 0.3178975
A post-hoc test using Wilcoxon tests with Bonferroni correction showed the significant differences between Condition “Furniture-Regular” and “NoFurniture-Irregular” (p < 0.05, r = 0.32).
Shapiro-Wilk normality test
data: data.subjective$Temporal
W = 0.88313, p-value = 1.959e-05
p < 0.01, NASA-TLX Temporal Demands data are not normally distributed. So we use ARTools to transform the data for multi-factor analysis. And then we use Friedman tests for single factor analysis.
We first check the homogenity using Bartlett’s test.
Bartlett test of homogeneity of variances
data: Temporal by interaction(Furniture, Layout)
Bartlett's K-squared = 0.37485, df = 3, p-value = 0.9454
From the output, it can be seen that the p-value of 0.9454 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Temporal demands is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.t.both <- anova(art.t.both)
model.t.both$part.eta.sq = with(model.t.both, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.t.bothAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Temporal)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 1.42399 0.23900 0.0306736
2 Layout Withn 1 45 0.20398 0.65370 0.0045124
3 Furniture:Layout Withn 1 45 0.40479 0.52785 0.0089152
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the output, it can be seen that we cannot find any evidence to suggest that the variance in Temporal demands is statistically significantly different among the factors or combination of the factors.
Then, we use Friedman’s test to analyse the furniture factor.
data.temporal.furniture <- data.subjective %>% dplyr::group_by(PID, Furniture) %>% dplyr::summarise(Temporal = mean(Temporal), .groups = "drop")
friedman.test(y=data.temporal.furniture$Temporal, groups=data.temporal.furniture$Furniture, blocks=data.temporal.furniture$PID)
Friedman rank sum test
data: data.temporal.furniture$Temporal, data.temporal.furniture$Furniture and data.temporal.furniture$PID
Friedman chi-squared = 1.6, df = 1, p-value = 0.2059
A Friedman’s test revealed no significant effect of Furniture factor on Temporal Demands (chi-squared = 1.6, p = 0.2).
Then, we use Friedman’s test to analyse the layout factor.
data.temporal.layout <- data.subjective %>% dplyr::group_by(PID, Layout) %>% dplyr::summarise(Temporal = mean(Temporal), .groups = "drop")
friedman.test(y=data.temporal.layout$Temporal, groups=data.temporal.layout$Layout, blocks=data.temporal.layout$PID)
Friedman rank sum test
data: data.temporal.layout$Temporal, data.temporal.layout$Layout and data.temporal.layout$PID
Friedman chi-squared = 0, df = 1, p-value = 1
A Friedman’s test revealed no significant effect of Layout factor on Temporal Demands (chi-squared = 0, p = 1).
Then, we use Friedman’s test to analyse the four conditions.
data.temporal.condition <- data.subjective %>% dplyr::group_by(PID, Condition) %>% dplyr::summarise(Temporal = mean(Temporal), .groups = "drop")
friedman.test(y=data.temporal.condition$Temporal, groups=data.temporal.condition$Condition, blocks=data.temporal.condition$PID)
Friedman rank sum test
data: data.temporal.condition$Temporal, data.temporal.condition$Condition and data.temporal.condition$PID
Friedman chi-squared = 1.2816, df = 3, p-value = 0.7335
A Friedman’s test revealed no significant effect of four conditions on Temporal Demands (chi-squared = 1.3, p = 0.7).
Shapiro-Wilk normality test
data: data.subjective$Performance
W = 0.92085, p-value = 0.0005397
p < 0.01, NASA-TLX Performance data are not normally distributed. So we use ARTools to transform the data for multi-factor analysis. And then we use Friedman tests for single factor analysis.
We first check the homogenity using bartlett’s test.
Bartlett test of homogeneity of variances
data: Performance by interaction(Furniture, Layout)
Bartlett's K-squared = 1.3905, df = 3, p-value = 0.7078
From the output, it can be seen that the p-value of 0.7078 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Performance is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.pe.both <- anova(art.pe.both)
model.pe.both$part.eta.sq = with(model.pe.both, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.pe.bothAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Performance)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 12.34133 0.0010215 0.2152258 **
2 Layout Withn 1 45 0.15220 0.6982827 0.0033708
3 Furniture:Layout Withn 1 45 0.25599 0.6153610 0.0056564
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the output, it can be seen that we have significant main effects of Furniture (p < 0.01) with an effect size partial eta-squared 0.22. The effect size can be interpreted as a large effect (eta-squared >= 0.14).
Then, we use Friedman’s test to analyse the furniture factor.
data.performance.furniture <- data.subjective %>% dplyr::group_by(PID, Furniture) %>% dplyr::summarise(Performance = mean(Performance), .groups = "drop")
friedman.test(y=data.performance.furniture$Performance, groups=data.performance.furniture$Furniture, blocks=data.performance.furniture$PID)
Friedman rank sum test
data: data.performance.furniture$Performance, data.performance.furniture$Furniture and data.performance.furniture$PID
Friedman chi-squared = 6.2308, df = 1, p-value = 0.01255
A Friedman’s test revealed a significant effect of Furniture factor on Performance (chi-squared = 6.2, p < 0.05).
data.performance.furniture <- as.data.frame(data.performance.furniture)
data.performance.furniture %>% friedman_effsize(Performance ~ Furniture | PID)The effect size (Kendall’s W) for Furniture is 0.39. It implies a moderate effect size.
Then, we use Friedman’s test to analyse the layout factor.
data.performance.layout <- data.subjective %>% dplyr::group_by(PID, Layout) %>% dplyr::summarise(Performance = mean(Performance), .groups = "drop")
friedman.test(y=data.performance.layout$Performance, groups=data.performance.layout$Layout, blocks=data.performance.layout$PID)
Friedman rank sum test
data: data.performance.layout$Performance, data.performance.layout$Layout and data.performance.layout$PID
Friedman chi-squared = 0, df = 1, p-value = 1
From the output, it can be seen that the p value is 1 which is more than 0.05. It means that there is no evidence to suggest that the performance is statistically significantly different among different layouts.
Then, we use Friedman’s test to analyse the four conditions.
data.performance.condition <- data.subjective %>% dplyr::group_by(PID, Condition) %>% dplyr::summarise(Performance = mean(Performance), .groups = "drop")
friedman.test(y=data.performance.condition$Performance, groups=data.performance.condition$Condition, blocks=data.performance.condition$PID)
Friedman rank sum test
data: data.performance.condition$Performance, data.performance.condition$Condition and data.performance.condition$PID
Friedman chi-squared = 12.398, df = 3, p-value = 0.006136
A Friedman’s test revealed a significant effect of four conditions on Performance (chi-squared = 12.4, p < 0.01).
data.performance.condition <- as.data.frame(data.performance.condition)
data.performance.condition %>% friedman_effsize(Performance ~ Condition | PID)The effect size (Kendall’s W) is 0.26. It implies a small effect size.
pairwise.wilcox.test(data.performance.condition$Performance, data.performance.condition$Condition, p.adj="bonferroni", exact=F, paired=T)
Pairwise comparisons using Wilcoxon signed rank test with continuity correction
data: data.performance.condition$Performance and data.performance.condition$Condition
Furniture-Irregular Furniture-Regular NoFurniture-Irregular
Furniture-Regular 1.000 - -
NoFurniture-Irregular 0.149 0.099 -
NoFurniture-Regular 0.402 0.148 1.000
P value adjustment method: bonferroni
A post-hoc test using Wilcoxon tests with Bonferroni correction showed no significant differences among four conditions.
Shapiro-Wilk normality test
data: data.subjective$Effort
W = 0.92454, p-value = 0.0007735
p < 0.01, NASA-TLX Effort data are not normally distributed. So we use ARTools to transform the data for multi-factor analysis. And then we use Friedman tests for single factor analysis.
We first check the homogenity using bartlett’s test.
Bartlett test of homogeneity of variances
data: Effort by interaction(Furniture, Layout)
Bartlett's K-squared = 0.049748, df = 3, p-value = 0.9971
From the output, it can be seen that the p-value of 0.9971 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Effort is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.e.both <- anova(art.e.both)
model.e.both$part.eta.sq = with(model.e.both, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.e.bothAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Effort)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 7.48524 0.008871 0.142616 **
2 Layout Withn 1 45 2.92395 0.094162 0.061012 .
3 Furniture:Layout Withn 1 45 0.69259 0.409679 0.015158
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the output, it can be seen that we have significant main effects of Furniture (p < 0.01) with an effect size partial eta-squared 0.14. The effect size can be interpreted as a large effect (eta-squared >= 0.14).
Then, we use Friedman’s test to analyse the furniture factor.
data.effort.furniture <- data.subjective %>% dplyr::group_by(PID, Furniture) %>% dplyr::summarise(Effort = mean(Effort), .groups = "drop")
friedman.test(y=data.effort.furniture$Effort, groups=data.effort.furniture$Furniture, blocks=data.effort.furniture$PID)
Friedman rank sum test
data: data.effort.furniture$Effort, data.effort.furniture$Furniture and data.effort.furniture$PID
Friedman chi-squared = 1.9231, df = 1, p-value = 0.1655
A Friedman’s test revealed no significant effect of Furniture factor on Effort (chi-squared = 1.9, p = 0.17).
Then, we use Friedman’s test to analyse the layout factor.
data.effort.layout <- data.subjective %>% dplyr::group_by(PID, Layout) %>% dplyr::summarise(Effort = mean(Effort), .groups = "drop")
friedman.test(y=data.effort.layout$Effort, groups=data.effort.layout$Layout, blocks=data.effort.layout$PID)
Friedman rank sum test
data: data.effort.layout$Effort, data.effort.layout$Layout and data.effort.layout$PID
Friedman chi-squared = 1.9231, df = 1, p-value = 0.1655
A Friedman’s test revealed no significant effect of Layout factor on Effort (chi-squared = 1.9, p = 0.17).
Then, we use Friedman’s test to analyse the four conditions.
data.effort.condition <- data.subjective %>% dplyr::group_by(PID, Condition) %>% dplyr::summarise(Effort = mean(Effort), .groups = "drop")
friedman.test(y=data.effort.condition$Effort, groups=data.effort.condition$Condition, blocks=data.effort.condition$PID)
Friedman rank sum test
data: data.effort.condition$Effort, data.effort.condition$Condition and data.effort.condition$PID
Friedman chi-squared = 8.7317, df = 3, p-value = 0.03308
A Friedman’s test revealed a significant effect of four conditions on Effort (chi-squared = 8.7, p < 0.05).
data.effort.condition <- as.data.frame(data.effort.condition)
data.effort.condition %>% friedman_effsize(Effort ~ Condition | PID)The effect size (Kendall’s W) is 0.18. It implies a small effect size.
pairwise.wilcox.test(data.effort.condition$Effort, data.effort.condition$Condition, p.adj="bonferroni", exact=F, paired=T)
Pairwise comparisons using Wilcoxon signed rank test with continuity correction
data: data.effort.condition$Effort and data.effort.condition$Condition
Furniture-Irregular Furniture-Regular NoFurniture-Irregular
Furniture-Regular 1.000 - -
NoFurniture-Irregular 0.099 0.060 -
NoFurniture-Regular 1.000 1.000 0.312
P value adjustment method: bonferroni
A post-hoc test using Wilcoxon tests with Bonferroni correction showed no significant differences among four conditions.
Shapiro-Wilk normality test
data: data.subjective$Frustration
W = 0.92003, p-value = 0.0004983
p < 0.01, NASA-TLX Frustration data are not normally distributed. So we use ARTools to transform the data for multi-factor analysis. And then we use Friedman tests for single factor analysis.
We first check the homogenity using bartlett’s test.
Bartlett test of homogeneity of variances
data: Frustration by interaction(Furniture, Layout)
Bartlett's K-squared = 2.7132, df = 3, p-value = 0.438
From the output, it can be seen that the p-value of 0.438 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Frustration is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.f.both <- anova(art.f.both)
model.f.both$part.eta.sq = with(model.f.both, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.f.bothAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Frustration)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 5.214990 0.027165 0.10385324 *
2 Layout Withn 1 45 0.870699 0.355742 0.01898159
3 Furniture:Layout Withn 1 45 0.036023 0.850321 0.00079987
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the output, it can be seen that we have significant main effects of Furniture (p < 0.05) with an effect size partial eta-squared 0.1. The effect size can be interpreted as a medium effect (0.06 - 0.14).
Then, we use Friedman’s test to analyse the furniture factor.
data.frustration.furniture <- data.subjective %>% dplyr::group_by(PID, Furniture) %>% dplyr::summarise(Frustration = mean(Frustration), .groups = "drop")
friedman.test(y=data.frustration.furniture$Frustration, groups=data.frustration.furniture$Furniture, blocks=data.frustration.furniture$PID)
Friedman rank sum test
data: data.frustration.furniture$Frustration, data.frustration.furniture$Furniture and data.frustration.furniture$PID
Friedman chi-squared = 3.7692, df = 1, p-value = 0.0522
A Friedman’s test revealed no significant effect of Furniture factor on Frustration (chi-squared = 3.8, p = 0.052).
Then, we use Friedman’s test to analyse the layout factor.
data.frustration.layout <- data.subjective %>% dplyr::group_by(PID, Layout) %>% dplyr::summarise(Frustration = mean(Frustration), .groups = "drop")
friedman.test(y=data.frustration.layout$Frustration, groups=data.frustration.layout$Layout, blocks=data.frustration.layout$PID)
Friedman rank sum test
data: data.frustration.layout$Frustration, data.frustration.layout$Layout and data.frustration.layout$PID
Friedman chi-squared = 0.6, df = 1, p-value = 0.4386
A Friedman’s test revealed no significant effect of Furniture factor on Frustration (chi-squared = 0.6, p = 0.44).
Then, we use Friedman’s test to analyse the four conditions.
data.frustration.condition <- data.subjective %>% dplyr::group_by(PID, Condition) %>% dplyr::summarise(Frustration = mean(Frustration), .groups = "drop")
friedman.test(y=data.frustration.condition$Frustration, groups=data.frustration.condition$Condition, blocks=data.frustration.condition$PID)
Friedman rank sum test
data: data.frustration.condition$Frustration, data.frustration.condition$Condition and data.frustration.condition$PID
Friedman chi-squared = 6.5116, df = 3, p-value = 0.08921
A Friedman’s test revealed no significant effect of four conditions on Frustration (chi-squared = 6.5, p = 0.09).
Shapiro-Wilk normality test
data: data.subjective$Mean
W = 0.95205, p-value = 0.01446
p < 0.05, NASA-TLX Mean data are not normally distributed. So we use ARTools to transform the data for multi-factor analysis. And then we use Friedman tests for single factor analysis.
We first check the homogenity using bartlett’s test.
Bartlett test of homogeneity of variances
data: Mean by interaction(Furniture, Layout)
Bartlett's K-squared = 0.63008, df = 3, p-value = 0.8895
From the output, it can be seen that the p-value of 0.8895 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Mean is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.me.both <- anova(art.me.both)
model.me.both$part.eta.sq = with(model.me.both, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.me.bothAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Mean)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 14.992474 0.00034652 0.24990591 ***
2 Layout Withn 1 45 2.708653 0.10677311 0.05677487
3 Furniture:Layout Withn 1 45 0.028261 0.86725105 0.00062762
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the output, it can be seen that we have significant main effects of Furniture (p < 0.01) with an effect size partial eta-squared 0.25. The effect size can be interpreted as a large effect (eta-squared >= 0.14).
Then, we use Friedman’s test to analyse the furniture factor.
data.mean.furniture <- data.subjective %>% dplyr::group_by(PID, Furniture) %>% dplyr::summarise(Mean = mean(Mean), .groups = "drop")
friedman.test(y=data.mean.furniture$Mean, groups=data.mean.furniture$Furniture, blocks=data.mean.furniture$PID)
Friedman rank sum test
data: data.mean.furniture$Mean, data.mean.furniture$Furniture and data.mean.furniture$PID
Friedman chi-squared = 4, df = 1, p-value = 0.0455
A Friedman’s test revealed a significant effect of Furniture factor on Mean (chi-squared = 4, p < 0.05).
data.mean.furniture <- as.data.frame(data.mean.furniture)
data.mean.furniture %>% friedman_effsize(Mean ~ Furniture | PID)The effect size (Kendall’s W) for Furniture is 0.25. It implies a small effect size.
Then, we use Friedman’s test to analyse the layout factor.
data.mean.layout <- data.subjective %>% dplyr::group_by(PID, Layout) %>% dplyr::summarise(Mean = mean(Mean), .groups = "drop")
friedman.test(y=data.mean.layout$Mean, groups=data.mean.layout$Layout, blocks=data.mean.layout$PID)
Friedman rank sum test
data: data.mean.layout$Mean, data.mean.layout$Layout and data.mean.layout$PID
Friedman chi-squared = 0.25, df = 1, p-value = 0.6171
From the output, it can be seen that the p value is 0.61 which is more than 0.05. It means that there is no evidence to suggest that the Mean is statistically significantly different among different layouts.
Then, we use Friedman’s test to analyse the four conditions.
data.mean.condition <- data.subjective %>% dplyr::group_by(PID, Condition) %>% dplyr::summarise(Mean = mean(Mean), .groups = "drop")
friedman.test(y=data.mean.condition$Mean, groups=data.mean.condition$Condition, blocks=data.mean.condition$PID)
Friedman rank sum test
data: data.mean.condition$Mean, data.mean.condition$Condition and data.mean.condition$PID
Friedman chi-squared = 13.481, df = 3, p-value = 0.003705
A Friedman’s test revealed a significant effect of four conditions on Mean (chi-squared = 13.5, p < 0.01).
data.mean.condition <- as.data.frame(data.mean.condition)
data.mean.condition %>% friedman_effsize(Mean ~ Condition | PID)The effect size (Kendall’s W) is 0.28. It implies a small effect size.
pairwise.wilcox.test(data.mean.condition$Mean, data.mean.condition$Condition, p.adj="bonferroni", exact=F, paired=T)
Pairwise comparisons using Wilcoxon signed rank test with continuity correction
data: data.mean.condition$Mean and data.mean.condition$Condition
Furniture-Irregular Furniture-Regular NoFurniture-Irregular
Furniture-Regular 1.000 - -
NoFurniture-Irregular 0.034 0.012 -
NoFurniture-Regular 1.000 0.104 0.792
P value adjustment method: bonferroni
wilcox_test(Mean ~ factor(Condition), data=data.mean.condition[data.mean.condition$Condition=="Furniture-Regular"|data.mean.condition$Condition=="NoFurniture-Irregular",], distribution="exact")
Exact Wilcoxon-Mann-Whitney Test
data: Mean by factor(Condition) (Furniture-Regular, NoFurniture-Irregular)
Z = -2.215, p-value = 0.02597
alternative hypothesis: true mu is not equal to 0
[1] 0.3915604
wilcox_test(Mean ~ factor(Condition), data=data.mean.condition[data.mean.condition$Condition=="Furniture-Irregular"|data.mean.condition$Condition=="NoFurniture-Irregular",], distribution="exact")
Exact Wilcoxon-Mann-Whitney Test
data: Mean by factor(Condition) (Furniture-Irregular, NoFurniture-Irregular)
Z = -1.7582, p-value = 0.08031
alternative hypothesis: true mu is not equal to 0
[1] 0.3108088
A post-hoc test using Wilcoxon tests with Bonferroni correction showed a significant differences between Condition “Furniture-Regular” and “NoFurniture-Irregular” (p < 0.05, r = 0.39) and between Condition “NoFurniture-Irregular” and “Furniture-Irregular” (p < 0.05, r = 0.31).
mean_Chart <- aggregate(cbind(Mental, Physical, Temporal, Performance, Effort, Frustration, Mean)~Furniture , data=data.subjective , mean)
rownames(mean_Chart) <- mean_Chart[,1]
mean_Chart <- as.matrix(mean_Chart[,-1])
lim <- 1.2*max(mean_Chart)
error.bar <- function(x, y, upper, lower=upper, length=0.1,...){
arrows(x,y+upper, x, y-lower, angle=90, code=3, length=length, ...)
}
stdev_Chart <- aggregate(cbind(Mental, Physical, Temporal, Performance, Effort, Frustration, Mean)~Furniture , data=data.subjective , sd)
rownames(stdev_Chart) <- stdev_Chart[,1]
se_Baseline <- as.matrix(stdev_Chart[,-1]) / sqrt(12)
ze_barplot <- barplot(mean_Chart , beside=T , legend.text=T,col=c("#66c2a5", "#fc8d62") , ylim=c(0,lim) , ylab="NASA-TLX Score", args.legend = list(x = "topright", inset = c(0, -0.15)), cex.names=0.8)
error.bar(ze_barplot, mean_Chart, se_Baseline)For the NASA-TLX result analysis on the Furniture factor, the ANOVA test of Aligned Rank Transformed data shows significant effects for Mental (p < 0.001, effect size partial eta-squared = 0.29), Physical (p < 0.05, effect size partial eta-squared = 0.10), Performance (p < 0.01, effect size partial eta-squared = 0.22), Effort (p < 0.01, effect size partial eta-squared = 0.14), Frustration (p < 0.05, effect size partial eta-squared = 0.10), and overall mean (p < 0.001, effect size partial eta-squared = 0.25). The results show that the participants perform the best in the Furniture condition with the least mental effort, physical effort, and frustration.
From the additional analysis on the Furniture factor using Friedman’s test, it shows significant effects for Mental (p < 0.05, chi-squared = 5.3, effect size Kendall’s W = 0.33), Physical (p < 0.01, chi-squared = 5.3, effect size Kendall’s W = 0.46), Performance (p < 0.05, chi-squared = 6.2, effect size Kendall’s W = 0.39), and overall mean (p < 0.05, chi-squared = 4, effect size Kendall’s W = 0.25). The results further proves that the participants perform the best in the Furniture condition with the least mental and physical effort.
Particularly, by analysing the effects on the four conditions using Friedman’s test and a post-hoc test using Wilcoxon tests with Bonferroni correction, we find significant differences between Condition “Furniture-Regular” and “NoFurniture-Irregular” on Mental (p < 0.05, r = 0.34), Physical (p < 0.05, r = 0.32), and Overall mean (p < 0.05, r = 0.39). We also find significant differences between Condition “NoFurniture-Irregular” and “Furniture-Irregular” on the Overall mean (p < 0.05, r = 0.31).
Condition PID Rating Furniture Layout
Length:64 1 : 4 Min. :1.000 Furniture :32 Irregular:32
Class :character 2 : 4 1st Qu.:2.000 NoFurniture:32 Regular :32
Mode :character 3 : 4 Median :3.000
4 : 4 Mean :3.031
5 : 4 3rd Qu.:4.000
6 : 4 Max. :5.000
(Other):40
Shapiro-Wilk normality test
data: data.rating$Rating
W = 0.87362, p-value = 9.282e-06
p < 0.01, user rating data are not normally distributed. So we use ARTools to transform the data for multi-factor analysis. And then we use Friedman tests for single factor analysis.
We first check the homogenity using bartlett’s test.
Bartlett test of homogeneity of variances
data: Rating by interaction(Furniture, Layout)
Bartlett's K-squared = 3.7538, df = 3, p-value = 0.2893
From the output, it can be seen that the p-value of 0.2893 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in User Rating is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.rating.both <- anova(art.rating.both)
model.rating.both$part.eta.sq = with(model.rating.both, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.rating.bothAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Rating)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Furniture Withn 1 45 20.22016 4.8114e-05 0.310029 ***
2 Layout Withn 1 45 2.47866 0.12241 0.052206
3 Furniture:Layout Withn 1 45 0.69189 0.40992 0.015142
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
From the output, it can be seen that we have significant main effects of Furniture (p < 0.01) with an effect size partial eta-squared 0.31. The effect size can be interpreted as a large effect (eta-squared >= 0.14).
Then, we use Friedman’s test to analyse the furniture factor.
data.rating.furniture <- data.rating %>% dplyr::group_by(PID, Furniture) %>% dplyr::summarise(Rating = mean(Rating), .groups = "drop")
friedman.test(y=data.rating.furniture$Rating, groups=data.rating.furniture$Furniture, blocks=data.rating.furniture$PID)
Friedman rank sum test
data: data.rating.furniture$Rating, data.rating.furniture$Furniture and data.rating.furniture$PID
Friedman chi-squared = 4.5714, df = 1, p-value = 0.03251
A Friedman’s test revealed a significant effect of Furniture factor on Rating (chi-squared = 4.6, p < 0.05).
data.rating.furniture <- as.data.frame(data.rating.furniture)
data.rating.furniture %>% friedman_effsize(Rating ~ Furniture | PID)The effect size (Kendall’s W) for Furniture is 0.29. It implies a small effect size.
Then, we use Friedman’s test to analyse the layout factor.
data.rating.layout <- data.rating %>% dplyr::group_by(PID, Layout) %>% dplyr::summarise(Rating = mean(Rating), .groups = "drop")
friedman.test(y=data.rating.layout$Rating, groups=data.rating.layout$Layout, blocks=data.rating.layout$PID)
Friedman rank sum test
data: data.rating.layout$Rating, data.rating.layout$Layout and data.rating.layout$PID
Friedman chi-squared = 0.81818, df = 1, p-value = 0.3657
From the output, it can be seen that the p value is 0.37 which is more than 0.05. It means that there is no evidence to suggest that the performance is statistically significantly different among different layouts.
Then, we use Friedman’s test to analyse the four conditions.
data.rating.condition <- data.rating %>% dplyr::group_by(PID, Condition) %>% dplyr::summarise(Rating = mean(Rating), .groups = "drop")
friedman.test(y=data.rating.condition$Rating, groups=data.rating.condition$Condition, blocks=data.rating.condition$PID)
Friedman rank sum test
data: data.rating.condition$Rating, data.rating.condition$Condition and data.rating.condition$PID
Friedman chi-squared = 13.055, df = 3, p-value = 0.004519
A Friedman’s test revealed a significant effect of four conditions on User Rating (chi-squared = 13.1, p < 0.01).
data.rating.condition <- as.data.frame(data.rating.condition)
data.rating.condition %>% friedman_effsize(Rating ~ Condition | PID)The effect size (Kendall’s W) is 0.27. It implies a small effect size.
pairwise.wilcox.test(data.rating.condition$Rating, data.rating.condition$Condition, p.adj="bonferroni", exact=F, paired=T)
Pairwise comparisons using Wilcoxon signed rank test with continuity correction
data: data.rating.condition$Rating and data.rating.condition$Condition
Furniture+Irregular Furniture+Regular NoFurniture+Irregular
Furniture+Regular 1.000 - -
NoFurniture+Irregular 0.038 0.013 -
NoFurniture+Regular 0.636 0.147 0.466
P value adjustment method: bonferroni
wilcox_test(Rating ~ factor(Condition), data=data.rating.condition[data.rating.condition$Condition=="Furniture+Regular"|data.rating.condition$Condition=="NoFurniture+Irregular",], distribution="exact")
Exact Wilcoxon-Mann-Whitney Test
data: Rating by factor(Condition) (Furniture+Regular, NoFurniture+Irregular)
Z = 3.7797, p-value = 6.439e-05
alternative hypothesis: true mu is not equal to 0
[1] 0.6681629
wilcox_test(Rating ~ factor(Condition), data=data.rating.condition[data.rating.condition$Condition=="Furniture+Irregular"|data.rating.condition$Condition=="NoFurniture+Irregular",], distribution="exact")
Exact Wilcoxon-Mann-Whitney Test
data: Rating by factor(Condition) (Furniture+Irregular, NoFurniture+Irregular)
Z = 3.1177, p-value = 0.001435
alternative hypothesis: true mu is not equal to 0
[1] 0.5511367
A post-hoc test using Wilcoxon tests with Bonferroni correction showed a significant differences between Condition “Furniture-Regular” and “NoFurniture-Irregular” (p < 0.05, r = 0.67) and between Condition “NoFurniture-Irregular” and “Furniture-Irregular” (p < 0.05, r = 0.55).
d <- Rmisc::summarySE(data.rating, measurevar = "Rating", groupvars = c("Condition"))
ggplot(d, aes(x = Condition, y = Rating, fill = Condition)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Rating-ci, ymax=Rating+ci)) + scale_fill_manual(values=c("#e41a1c", "#377eb8", "#984ea3", "#ff7f00"))For the quantitative analysis on the User Ratings of two factors, we can see that from the ANOVA test of Aligned Rank Transformed data, we have significant main effects of Furniture (p < 0.01) with an effect size partial eta-squared 0.31. The effect size can be interpreted as a large effect (eta-squared >= 0.14). An additional Friedman’s test proves the significant effect of Furniture factor (p < 0.05, chi-squared = 4.6, effect size Kendall’s W = 0.29).
Another Friedman’s test and a post-hoc Wilcoxon tests with Bonferroni correction on the User Ratings of four conditions shows that there is a significant differences between Condition “Furniture-Regular” and “NoFurniture-Irregular” (p < 0.05, r = 0.67) and between Condition “NoFurniture-Irregular” and “Furniture-Irregular” (p < 0.05, r = 0.55).
PID TrialID Furniture Layout Condition AnswerTime
1 : 20 1 : 16 HasFurniture:160 Irregular:160 HasFurniture-Irregular:80 Min. : 11.76
2 : 20 10 : 16 NoFurniture :160 Regular :160 HasFurniture-Regular :80 1st Qu.: 20.21
3 : 20 11 : 16 NoFurniture-Irregular :80 Median : 24.74
4 : 20 12 : 16 NoFurniture-Regular :80 Mean : 28.17
5 : 20 13 : 16 3rd Qu.: 31.84
6 : 20 14 : 16 Max. :107.30
(Other):200 (Other):224
Q <- quantile(data.recallTime.raw$AnswerTime, probs=c(.25, .75), na.rm = FALSE)
iqr <- IQR(data.recallTime.raw$AnswerTime)
up <- Q[2]+1.5*iqr # Upper Range
outliers <- subset(data.recallTime.raw, data.recallTime.raw$AnswerTime >= up)
outliersWe found 20 trials where participants spent more than usual time (> 49.3s) during the recall phase, causing the data not valid. We then remove those 20 trials from the raw data.
data.recallTime.eliminated <- subset(data.recallTime.raw, data.recallTime.raw$AnswerTime < up)
str(data.recallTime.eliminated)'data.frame': 300 obs. of 6 variables:
$ PID : Factor w/ 16 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
$ TrialID : Factor w/ 20 levels "1","10","11",..: 1 12 14 15 16 17 18 19 20 2 ...
$ Furniture : Factor w/ 2 levels "HasFurniture",..: 1 1 1 1 1 2 2 2 2 2 ...
$ Layout : Factor w/ 2 levels "Irregular","Regular": 2 2 2 2 2 2 2 2 2 2 ...
$ Condition : Factor w/ 4 levels "HasFurniture-Irregular",..: 2 2 2 2 2 4 4 4 4 4 ...
$ AnswerTime: num 34.1 15.3 20.7 22.2 26 ...
PID TrialID Furniture Layout Condition AnswerTime
1 : 20 10 : 16 HasFurniture:150 Irregular:146 HasFurniture-Irregular:73 Min. :11.76
3 : 20 11 : 16 NoFurniture :150 Regular :154 HasFurniture-Regular :77 1st Qu.:19.91
6 : 20 12 : 16 NoFurniture-Irregular :73 Median :24.07
7 : 20 13 : 16 NoFurniture-Regular :77 Mean :25.31
8 : 20 14 : 16 3rd Qu.:29.68
9 : 20 18 : 16 Max. :48.92
(Other):180 (Other):204
After removing, we have 300 observations left for further analysis.
data.recallTime.eliminated = subset(data.recallTime.eliminated, select = -TrialID)
data.recallTime <- data.recallTime.eliminated %>% group_by(PID, Condition) %>% mutate(AnswerTime = mean(AnswerTime)) %>% ungroup()
data.recallTime <- distinct(data.recallTime)
data.recallTime.female <- filter(data.recallTime, as.integer(data.recallTime$PID) <= 8)
data.recallTime.male <- filter(data.recallTime, as.integer(data.recallTime$PID) > 8)
summary(data.recallTime) PID Furniture Layout Condition AnswerTime
1 : 4 HasFurniture:32 Irregular:31 HasFurniture-Irregular:16 Min. :14.19
2 : 4 NoFurniture :31 Regular :32 HasFurniture-Regular :16 1st Qu.:21.83
3 : 4 NoFurniture-Irregular :15 Median :25.31
4 : 4 NoFurniture-Regular :16 Mean :25.55
5 : 4 3rd Qu.:28.71
6 : 4 Max. :41.85
(Other):39
Shapiro-Wilk normality test
data: data.recallTime$AnswerTime
W = 0.98375, p-value = 0.5727
We can clearly see from the result that p value is > 0.05, which means that the dataare normally distributed. So, we use ANOVA test for different dependent variables.
Bartlett test of homogeneity of variances
data: AnswerTime by interaction(Furniture, Layout)
Bartlett's K-squared = 1.9219, df = 3, p-value = 0.5888
From the output, it can be seen that the p-value of 0.5888 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Recall Time is statistically significantly different among different factors or the combination of factors. Thus, we can assume the homogenity.
model.recallTime <- aov(AnswerTime ~ Furniture * Layout + Error(PID), data = data.recallTime)
summary(model.recallTime)
Error: PID
Df Sum Sq Mean Sq F value Pr(>F)
Furniture 1 403.8 403.8 7.166 0.0181 *
Residuals 14 788.9 56.3
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
Furniture 1 6.9 6.92 0.454 0.504
Layout 1 0.2 0.19 0.012 0.912
Furniture:Layout 1 39.0 38.96 2.555 0.117
Residuals 44 671.0 15.25
From the two-way repeated measures ANOVA results above, we can see that there is no significant effects for any of the factors or combinations of the factors.
t.Furniture.RecallTime <- t.test(data.recallTime[data.recallTime["Furniture"]=="HasFurniture",5], data.recallTime[data.recallTime['Furniture']=="NoFurniture",5])
t.Furniture.RecallTime
Welch Two Sample t-test
data: data.recallTime[data.recallTime["Furniture"] == "HasFurniture", 5] and data.recallTime[data.recallTime["Furniture"] == "NoFurniture", 5]
t = 0.72458, df = 57.39, p-value = 0.4717
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-1.800061 3.841842
sample estimates:
mean of x mean of y
26.05695 25.03606
From the Unpaired T Test above, we can see that there is no significant effect on Recall time between two furniture conditions.
t.Layout.RecallTime <- t.test(data.recallTime[data.recallTime["Layout"]=="Regular",5], data.recallTime[data.recallTime['Layout']=="Irregular",5])
t.Layout.RecallTime
Welch Two Sample t-test
data: data.recallTime[data.recallTime["Layout"] == "Regular", 5] and data.recallTime[data.recallTime["Layout"] == "Irregular", 5]
t = 0.16739, df = 60.948, p-value = 0.8676
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-2.582852 3.054768
sample estimates:
mean of x mean of y
25.67072 25.43476
From the Unpaired T Test above, we can see that there is no significant effect on Recall time between two layout conditions.
Bartlett test of homogeneity of variances
data: AnswerTime by Condition
Bartlett's K-squared = 1.9219, df = 3, p-value = 0.5888
From the output, it can be seen that the p-value of 0.5888 is not less than the significance level of 0.05. This means that there is no evidence to suggest that the variance in Recall Time is statistically significantly different among different conditions. Thus, we can assume the homogenity.
Df Sum Sq Mean Sq F value Pr(>F)
Condition 3 40.1 13.36 0.422 0.738
Residuals 59 1869.6 31.69
From the one-way repeated measures ANOVA results above, we cannot find a strong significant main effect among the four conditions (p = 0.738).
d <- Rmisc::summarySE(data.recallTime, measurevar = "AnswerTime", groupvars = c("Condition"))
ggplot(d, aes(x = Condition, y = AnswerTime, fill = Condition)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=AnswerTime-ci, ymax=AnswerTime+ci)) + scale_fill_manual(values=c("#e41a1c", "#377eb8", "#984ea3", "#ff7f00"))We don’t find any evidence to suggest that the Furniture factor or Layout factor has a main effect on the Recall Time.
PID Furniture Rotation Distance
1 : 2 Furniture :16 Min. :1056 Min. : 7.914
2 : 2 NoFurniture:16 1st Qu.:1445 1st Qu.: 8.611
3 : 2 Median :1863 Median : 9.447
4 : 2 Mean :1862 Mean : 9.761
5 : 2 3rd Qu.:2290 3rd Qu.:10.570
6 : 2 Max. :2949 Max. :14.975
(Other):20
PID Furniture Rotation Distance
1 : 2 Furniture :16 Min. :1251 Min. : 8.276
2 : 2 NoFurniture:16 1st Qu.:2012 1st Qu.: 9.750
3 : 2 Median :2511 Median :10.626
4 : 2 Mean :2564 Mean :11.174
5 : 2 3rd Qu.:2909 3rd Qu.:11.958
6 : 2 Max. :6255 Max. :22.826
(Other):20
PID Layout Rotation Distance
1 : 2 Irregular:16 Min. :1027 Min. : 7.921
2 : 2 Regular :16 1st Qu.:1470 1st Qu.: 8.497
3 : 2 Median :1894 Median : 9.237
4 : 2 Mean :1870 Mean : 9.754
5 : 2 3rd Qu.:2183 3rd Qu.:10.891
6 : 2 Max. :3238 Max. :13.347
(Other):20
PID Condition Rotation Distance
1 : 4 Furniture-Irregular :16 Min. : 850.2 Min. : 7.586
2 : 4 Furniture-Regular :16 1st Qu.:1261.7 1st Qu.: 8.462
3 : 4 NoFurniture-Irregular:16 Median :1814.3 Median : 9.233
4 : 4 NoFurniture-Regular :16 Mean :1866.2 Mean : 9.751
5 : 4 3rd Qu.:2306.1 3rd Qu.:10.583
6 : 4 Max. :4131.9 Max. :17.027
(Other):40
PID Condition Rotation Distance
1 : 4 Furniture-Irregular :16 Min. :1025 Min. : 7.772
2 : 4 Furniture-Regular :16 1st Qu.:1738 1st Qu.: 9.416
3 : 4 NoFurniture-Irregular:16 Median :2509 Median :10.344
4 : 4 NoFurniture-Regular :16 Mean :2566 Mean :11.121
5 : 4 3rd Qu.:2961 3rd Qu.:12.233
6 : 4 Max. :7063 Max. :26.287
(Other):40
Q <- quantile(data.locomotion.furniture.learning$Distance, probs=c(.25, .75), na.rm = FALSE)
iqr <- IQR(data.locomotion.furniture.learning$Distance)
up <- Q[2]+1.5*iqr # Upper Range
data.locomotion.furniture.learning.eliminated <- subset(data.locomotion.furniture.learning, data.locomotion.furniture.learning$Distance < up)
summary(data.locomotion.furniture.learning.eliminated) PID Furniture Rotation Distance
1 : 2 Furniture :15 Min. :1056 Min. : 7.914
2 : 2 NoFurniture:16 1st Qu.:1438 1st Qu.: 8.541
3 : 2 Median :1857 Median : 9.309
4 : 2 Mean :1853 Mean : 9.593
5 : 2 3rd Qu.:2307 3rd Qu.:10.483
6 : 2 Max. :2949 Max. :12.628
(Other):19
Q <- quantile(data.locomotion.furniture.recall$Distance, probs=c(.25, .75), na.rm = FALSE)
iqr <- IQR(data.locomotion.furniture.recall$Distance)
up <- Q[2]+1.5*iqr # Upper Range
data.locomotion.furniture.recall.eliminated <- subset(data.locomotion.furniture.recall, data.locomotion.furniture.recall$Distance < up)
summary(data.locomotion.furniture.recall.eliminated) PID Furniture Rotation Distance
1 : 2 Furniture :15 Min. :1251 Min. : 8.276
2 : 2 NoFurniture:16 1st Qu.:2006 1st Qu.: 9.732
3 : 2 Median :2437 Median :10.578
4 : 2 Mean :2445 Mean :10.798
5 : 2 3rd Qu.:2881 3rd Qu.:11.823
6 : 2 Max. :4791 Max. :14.081
(Other):19
Shapiro-Wilk normality test
data: data.locomotion.furniture.learning.eliminated$Rotation
W = 0.96749, p-value = 0.4528
Shapiro-Wilk normality test
data: data.locomotion.furniture.learning.eliminated$Distance
W = 0.94805, p-value = 0.1379
Shapiro-Wilk normality test
data: data.locomotion.furniture.recall.eliminated$Rotation
W = 0.93568, p-value = 0.06272
Shapiro-Wilk normality test
data: data.locomotion.furniture.recall.eliminated$Distance
W = 0.96153, p-value = 0.3201
Both Rotation data and Distance data are normally distributed. So we use t test to compare the two groups in Furniture factor
t.Furniture.learning.Rotation <- t.test(data.locomotion.furniture.learning.eliminated[data.locomotion.furniture.learning.eliminated["Furniture"]=="Furniture",3], data.locomotion.furniture.learning.eliminated[data.locomotion.furniture.learning.eliminated['Furniture']=="NoFurniture",3])
t.Furniture.learning.Rotation
Welch Two Sample t-test
data: data.locomotion.furniture.learning.eliminated[data.locomotion.furniture.learning.eliminated["Furniture"] == "Furniture", 3] and data.locomotion.furniture.learning.eliminated[data.locomotion.furniture.learning.eliminated["Furniture"] == "NoFurniture", 3]
t = 0.89424, df = 25.303, p-value = 0.3796
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-217.5201 551.7224
sample estimates:
mean of x mean of y
1938.946 1771.845
t.Furniture.learning.Distance <- t.test(data.locomotion.furniture.learning.eliminated[data.locomotion.furniture.learning.eliminated["Furniture"]=="Furniture",4], data.locomotion.furniture.learning.eliminated[data.locomotion.furniture.learning.eliminated['Furniture']=="NoFurniture",4])
t.Furniture.learning.Distance
Welch Two Sample t-test
data: data.locomotion.furniture.learning.eliminated[data.locomotion.furniture.learning.eliminated["Furniture"] == "Furniture", 4] and data.locomotion.furniture.learning.eliminated[data.locomotion.furniture.learning.eliminated["Furniture"] == "NoFurniture", 4]
t = 0.55073, df = 26.941, p-value = 0.5864
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.6713274 1.1638507
sample estimates:
mean of x mean of y
9.719889 9.473627
t.Furniture.recall.Rotation <- t.test(data.locomotion.furniture.recall.eliminated[data.locomotion.furniture.recall.eliminated["Furniture"]=="Furniture",3], data.locomotion.furniture.recall.eliminated[data.locomotion.furniture.recall.eliminated['Furniture']=="NoFurniture",3])
t.Furniture.recall.Rotation
Welch Two Sample t-test
data: data.locomotion.furniture.recall.eliminated[data.locomotion.furniture.recall.eliminated["Furniture"] == "Furniture", 3] and data.locomotion.furniture.recall.eliminated[data.locomotion.furniture.recall.eliminated["Furniture"] == "NoFurniture", 3]
t = -0.83494, df = 26.847, p-value = 0.4111
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-750.6561 316.5145
sample estimates:
mean of x mean of y
2332.649 2549.720
t.Furniture.recall.Distance <- t.test(data.locomotion.furniture.recall.eliminated[data.locomotion.furniture.recall.eliminated["Furniture"]=="Furniture",4], data.locomotion.furniture.recall.eliminated[data.locomotion.furniture.recall.eliminated['Furniture']=="NoFurniture",4])
t.Furniture.recall.Distance
Welch Two Sample t-test
data: data.locomotion.furniture.recall.eliminated[data.locomotion.furniture.recall.eliminated["Furniture"] == "Furniture", 4] and data.locomotion.furniture.recall.eliminated[data.locomotion.furniture.recall.eliminated["Furniture"] == "NoFurniture", 4]
t = -0.75028, df = 28.641, p-value = 0.4592
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-1.6237630 0.7525175
sample estimates:
mean of x mean of y
10.57311 11.00874
With a Welch’s t test, we found no significant effect for Furniture factor on Head Rotation and Walking Distance.
d <- Rmisc::summarySE(data.locomotion.furniture.learning.eliminated, measurevar = "Rotation", groupvars = c("Furniture"))
ggplot(d, aes(x = Furniture, y = Rotation, fill = Furniture)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Rotation-ci, ymax=Rotation+ci)) + scale_fill_manual(values=c("#66c2a5", "#fc8d62")) + labs(y = "Rotation - Learning Phase", x = "")
d2 <- Rmisc::summarySE(data.locomotion.furniture.learning.eliminated, measurevar = "Distance", groupvars = c("Furniture"))
ggplot(d2, aes(x = Furniture, y = Distance, fill = Furniture)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Distance-ci, ymax=Distance+ci)) + scale_fill_manual(values=c("#66c2a5", "#fc8d62")) + labs(y = "Distance - Learning Phase", x = "")
d3 <- Rmisc::summarySE(data.locomotion.furniture.recall.eliminated, measurevar = "Rotation", groupvars = c("Furniture"))
ggplot(d, aes(x = Furniture, y = Rotation, fill = Furniture)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Rotation-ci, ymax=Rotation+ci)) + scale_fill_manual(values=c("#66c2a5", "#fc8d62")) + labs(y = "Rotation - Recall Phase", x = "")
d4 <- Rmisc::summarySE(data.locomotion.furniture.recall.eliminated, measurevar = "Distance", groupvars = c("Furniture"))
ggplot(d2, aes(x = Furniture, y = Distance, fill = Furniture)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Distance-ci, ymax=Distance+ci)) + scale_fill_manual(values=c("#66c2a5", "#fc8d62")) + labs(y = "Distance - Recall Phase", x = "")
Shapiro-Wilk normality test
data: data.locomotion.layout$Rotation
W = 0.95641, p-value = 0.2185
Shapiro-Wilk normality test
data: data.locomotion.layout$Distance
W = 0.88823, p-value = 0.003149
The Rotation data are normally distributed, while the distance data are not normally distributed. So we use t test to compare the two groups in Furniture factor for head rotations, while using Mann-Whitney’s U test for walking distance.
t.Layout.Rotation <- t.test(data.locomotion.layout[data.locomotion.layout["Layout"]=="Regular",3], data.locomotion.layout[data.locomotion.layout['Layout']=="Irregular",3], paired = T)
t.Layout.Rotation
Paired t-test
data: data.locomotion.layout[data.locomotion.layout["Layout"] == "Regular", 3] and data.locomotion.layout[data.locomotion.layout["Layout"] == "Irregular", 3]
t = 1.2705, df = 15, p-value = 0.2233
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-149.8986 592.2968
sample estimates:
mean of the differences
221.1991
With a Welch’s t test, we found no significant effect for Layout factor on Head Rotation.
W.Layout.Distance <- wilcox.test(data.locomotion.layout[data.locomotion.layout["Layout"]=="Regular",4], data.locomotion.layout[data.locomotion.layout['Layout']=="Irregular",4])
W.Layout.Distance
Wilcoxon rank sum exact test
data: data.locomotion.layout[data.locomotion.layout["Layout"] == "Regular", 4] and data.locomotion.layout[data.locomotion.layout["Layout"] == "Irregular", 4]
W = 140, p-value = 0.6689
alternative hypothesis: true location shift is not equal to 0
With a Mann-Whitney’s U test, we found no significant effect for Layout factor on Walking Distance.
d <- Rmisc::summarySE(data.locomotion.layout, measurevar = "Rotation", groupvars = c("Layout"))
ggplot(d, aes(x = Layout, y = Rotation, fill = Layout)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Rotation-ci, ymax=Rotation+ci)) + scale_fill_manual(values=c("#8da0cb", "#e78ac3"))
d2 <- Rmisc::summarySE(data.locomotion.layout, measurevar = "Distance", groupvars = c("Layout"))
ggplot(d2, aes(x = Layout, y = Distance, fill = Layout)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Distance-ci, ymax=Distance+ci)) + scale_fill_manual(values=c("#8da0cb", "#e78ac3"))
Q <- quantile(data.locomotion.condition.learning$Rotation, probs=c(.25, .75), na.rm = FALSE)
iqr <- IQR(data.locomotion.condition.learning$Rotation)
up <- Q[2]+1.5*iqr # Upper Range
data.locomotion.condition.learning.eliminated <- subset(data.locomotion.condition.learning, data.locomotion.condition.learning$Rotation < up)
Q2 <- quantile(data.locomotion.condition.learning.eliminated$Distance, probs=c(.25, .75), na.rm = FALSE)
iqr2 <- IQR(data.locomotion.condition.learning.eliminated$Distance)
up2 <- Q2[2]+1.5*iqr2 # Upper Range
data.locomotion.condition.learning.eliminated <- subset(data.locomotion.condition.learning.eliminated, data.locomotion.condition.learning.eliminated$Distance < up2)
boxplot(data.locomotion.condition.recall$Rotation)
Q3 <- quantile(data.locomotion.condition.recall$Rotation, probs=c(.25, .75), na.rm = FALSE)
iqr3 <- IQR(data.locomotion.condition.recall$Rotation)
up3 <- Q3[2]+1.5*iqr3 # Upper Range
data.locomotion.condition.recall.eliminated <- subset(data.locomotion.condition.recall, data.locomotion.condition.recall$Rotation < up3)
Q4 <- quantile(data.locomotion.condition.recall.eliminated$Distance, probs=c(.25, .75), na.rm = FALSE)
iqr4 <- IQR(data.locomotion.condition.recall.eliminated$Distance)
up4 <- Q4[2]+1.5*iqr4 # Upper Range
data.locomotion.condition.recall.eliminated <- subset(data.locomotion.condition.recall.eliminated, data.locomotion.condition.recall.eliminated$Distance < up4)
Shapiro-Wilk normality test
data: data.locomotion.condition.learning.eliminated$Rotation
W = 0.95341, p-value = 0.01953
Shapiro-Wilk normality test
data: data.locomotion.condition.learning.eliminated$Distance
W = 0.90655, p-value = 0.0001809
Shapiro-Wilk normality test
data: data.locomotion.condition.recall.eliminated$Rotation
W = 0.97435, p-value = 0.2369
Shapiro-Wilk normality test
data: data.locomotion.condition.recall.eliminated$Distance
W = 0.95094, p-value = 0.01725
Both Rotation and Distance data are not normally distributed. So we use ANOVA test of Aligned Rank Tranformed data for both dependent variables.
art.locomotion.learning.Rotation <- art(Rotation ~ Condition + Error(PID), data = data.locomotion.condition.learning.eliminated)
art.locomotion.learning.Distance <- art(Distance ~ Condition + Error(PID), data = data.locomotion.condition.learning.eliminated)
art.locomotion.recall.Distance <- art(Distance ~ Condition + Error(PID), data = data.locomotion.condition.recall.eliminated)model.locomotion.learning.Rotation <- anova(art.locomotion.learning.Rotation)
model.locomotion.learning.Rotation$part.eta.sq = with(model.locomotion.learning.Rotation, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.locomotion.learning.RotationAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Rotation)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Condition PID 1 14 0.19495 0.665574 0.013734
2 Condition Withn 3 43 3.61820 0.020456 0.201554 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
model.locomotion.learning.Distance <- anova(art.locomotion.learning.Distance)
model.locomotion.learning.Distance$part.eta.sq = with(model.locomotion.learning.Distance, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.locomotion.learning.DistanceAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Distance)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Condition PID 1 14 0.98601 0.33757 0.065795
2 Condition Withn 3 43 2.16593 0.10591 0.131274
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
model.locomotion.recall.Distance <- anova(art.locomotion.recall.Distance)
model.locomotion.recall.Distance$part.eta.sq = with(model.locomotion.recall.Distance, `Sum Sq`/(`Sum Sq` + `Sum Sq.res`))
model.locomotion.recall.DistanceAnalysis of Variance of Aligned Rank Transformed Data
Table Type: Repeated Measures Analysis of Variance Table (Type I)
Model: Repeated Measures (aov)
Response: art(Distance)
Error Df Df.res F value Pr(>F) part.eta.sq
1 Condition PID 1 14 0.49109 0.49492 0.033889
2 Condition Withn 3 41 0.88924 0.45477 0.061091
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Rotation in learning phase p=0.02, no significant difference in distance in learning phase or recall phase.
NOTE: Results are based on intra-block estimates and are biased.
contrast estimate SE df t.ratio p.value
(Furniture-Irregular) - (Furniture-Regular) 5.54 4.87 43 1.137 0.6689
(Furniture-Irregular) - (NoFurniture-Irregular) 10.06 4.65 43 2.163 0.1500
(Furniture-Irregular) - (NoFurniture-Regular) -4.31 4.65 43 -0.927 0.7905
(Furniture-Regular) - (NoFurniture-Irregular) 4.53 4.87 43 0.930 0.7890
(Furniture-Regular) - (NoFurniture-Regular) -9.85 4.87 43 -2.023 0.1955
(NoFurniture-Irregular) - (NoFurniture-Regular) -14.38 4.65 43 -3.090 0.0177
P value adjustment: tukey method for comparing a family of 4 estimates
model.recall.rotation <- aov(Rotation ~ Condition + Error(PID), data = data.locomotion.condition.recall.eliminated)
summary(model.recall.rotation)
Error: PID
Df Sum Sq Mean Sq F value Pr(>F)
Condition 1 5554266 5554266 5.169 0.0393 *
Residuals 14 15042047 1074432
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
Condition 3 563609 187870 0.662 0.58
Residuals 41 11635815 283800
d <- Rmisc::summarySE(data.locomotion.condition.learning.eliminated, measurevar = "Rotation", groupvars = c("Condition"))
ggplot(d, aes(x = Condition, y = Rotation, fill = Condition)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Rotation-ci, ymax=Rotation+ci)) + scale_fill_manual(values=c("#e41a1c", "#377eb8", "#984ea3", "#ff7f00")) + labs(y = "Rotation - Learning Phase", x = "")
d2 <- Rmisc::summarySE(data.locomotion.condition.learning.eliminated, measurevar = "Distance", groupvars = c("Condition"))
ggplot(d2, aes(x = Condition, y = Distance, fill = Condition)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Distance-ci, ymax=Distance+ci)) + scale_fill_manual(values=c("#e41a1c", "#377eb8", "#984ea3", "#ff7f00")) + labs(y = "Distance - Learning Phase", x = "")
d3 <- Rmisc::summarySE(data.locomotion.condition.recall.eliminated, measurevar = "Rotation", groupvars = c("Condition"))
ggplot(d3, aes(x = Condition, y = Rotation, fill = Condition)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Rotation-ci, ymax=Rotation+ci)) + scale_fill_manual(values=c("#e41a1c", "#377eb8", "#984ea3", "#ff7f00")) + labs(y = "Rotation - Recall Phase", x = "")
d4 <- Rmisc::summarySE(data.locomotion.condition.recall.eliminated, measurevar = "Distance", groupvars = c("Condition"))
ggplot(d4, aes(x = Condition, y = Distance, fill = Condition)) + geom_bar(stat = "identity") + geom_errorbar(aes(ymin=Distance-ci, ymax=Distance+ci)) + scale_fill_manual(values=c("#e41a1c", "#377eb8", "#984ea3", "#ff7f00")) + labs(y = "Distance - Recall Phase", x = "")From the ANOVA test of Aligned Ranked data and a post-hoc comparisons for the main effect, we find a significant difference between the Condition “NoFurniture-Irregular” and “NoFurniture-Regular” on the head rotation data. It tells us that when participants in a room without any furniture, they perform more head rotations on Regular layout than Irregular layout.