packages = c("dplyr","ggplot2", "data.table", "scales", "tidytext","ltm","rstatix")
existing = as.character(installed.packages()[,1])
for(pkg in packages[!(packages %in% existing)]) install.packages(pkg)WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
將程式套件安載入 ‘C:/Users/yuehchi/AppData/Local/R/win-library/4.2’
(因為 ‘lib’ 沒有被指定)
還安裝相依關係 ‘rprojroot’, ‘diffobj’, ‘brio’, ‘desc’, ‘pkgload’, ‘praise’, ‘waldo’, ‘testthat’, ‘numDeriv’, ‘SparseM’, ‘MatrixModels’, ‘minqa’, ‘nloptr’, ‘RcppEigen’, ‘carData’, ‘abind’, ‘pbkrtest’, ‘quantreg’, ‘lme4’, ‘corrplot’, ‘car’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/rprojroot_2.0.3.zip'
Content type 'application/zip' length 109359 bytes (106 KB)
downloaded 106 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/diffobj_0.3.5.zip'
Content type 'application/zip' length 990493 bytes (967 KB)
downloaded 967 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/brio_1.1.3.zip'
Content type 'application/zip' length 38376 bytes (37 KB)
downloaded 37 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/desc_1.4.2.zip'
Content type 'application/zip' length 325760 bytes (318 KB)
downloaded 318 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/pkgload_1.3.2.zip'
Content type 'application/zip' length 178465 bytes (174 KB)
downloaded 174 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/praise_1.0.0.zip'
Content type 'application/zip' length 19849 bytes (19 KB)
downloaded 19 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/waldo_0.4.0.zip'
Content type 'application/zip' length 101857 bytes (99 KB)
downloaded 99 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/testthat_3.1.6.zip'
Content type 'application/zip' length 2102883 bytes (2.0 MB)
downloaded 2.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/numDeriv_2016.8-1.1.zip'
Content type 'application/zip' length 116102 bytes (113 KB)
downloaded 113 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/SparseM_1.81.zip'
Content type 'application/zip' length 1026945 bytes (1002 KB)
downloaded 1002 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/MatrixModels_0.5-1.zip'
Content type 'application/zip' length 425321 bytes (415 KB)
downloaded 415 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/minqa_1.2.5.zip'
Content type 'application/zip' length 449260 bytes (438 KB)
downloaded 438 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/nloptr_2.0.3.zip'
Content type 'application/zip' length 1002127 bytes (978 KB)
downloaded 978 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/RcppEigen_0.3.3.9.3.zip'
Content type 'application/zip' length 2277032 bytes (2.2 MB)
downloaded 2.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/carData_3.0-5.zip'
Content type 'application/zip' length 1822165 bytes (1.7 MB)
downloaded 1.7 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/abind_1.4-5.zip'
Content type 'application/zip' length 63750 bytes (62 KB)
downloaded 62 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/pbkrtest_0.5.1.zip'
Content type 'application/zip' length 356428 bytes (348 KB)
downloaded 348 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/quantreg_5.94.zip'
Content type 'application/zip' length 1726873 bytes (1.6 MB)
downloaded 1.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/lme4_1.1-31.zip'
Content type 'application/zip' length 4525763 bytes (4.3 MB)
downloaded 4.3 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/corrplot_0.92.zip'
Content type 'application/zip' length 3844668 bytes (3.7 MB)
downloaded 3.7 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/car_3.1-1.zip'
Content type 'application/zip' length 1706088 bytes (1.6 MB)
downloaded 1.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/rstatix_0.7.1.zip'
Content type 'application/zip' length 608739 bytes (594 KB)
downloaded 594 KB
程式套件 ‘rprojroot’ 開啟成功,MD5 和檢查也透過
程式套件 ‘diffobj’ 開啟成功,MD5 和檢查也透過
程式套件 ‘brio’ 開啟成功,MD5 和檢查也透過
程式套件 ‘desc’ 開啟成功,MD5 和檢查也透過
程式套件 ‘pkgload’ 開啟成功,MD5 和檢查也透過
程式套件 ‘praise’ 開啟成功,MD5 和檢查也透過
程式套件 ‘waldo’ 開啟成功,MD5 和檢查也透過
程式套件 ‘testthat’ 開啟成功,MD5 和檢查也透過
程式套件 ‘numDeriv’ 開啟成功,MD5 和檢查也透過
程式套件 ‘SparseM’ 開啟成功,MD5 和檢查也透過
程式套件 ‘MatrixModels’ 開啟成功,MD5 和檢查也透過
程式套件 ‘minqa’ 開啟成功,MD5 和檢查也透過
程式套件 ‘nloptr’ 開啟成功,MD5 和檢查也透過
程式套件 ‘RcppEigen’ 開啟成功,MD5 和檢查也透過
程式套件 ‘carData’ 開啟成功,MD5 和檢查也透過
程式套件 ‘abind’ 開啟成功,MD5 和檢查也透過
程式套件 ‘pbkrtest’ 開啟成功,MD5 和檢查也透過
程式套件 ‘quantreg’ 開啟成功,MD5 和檢查也透過
程式套件 ‘lme4’ 開啟成功,MD5 和檢查也透過
程式套件 ‘corrplot’ 開啟成功,MD5 和檢查也透過
程式套件 ‘car’ 開啟成功,MD5 和檢查也透過
程式套件 ‘rstatix’ 開啟成功,MD5 和檢查也透過
下載的二進位程式套件在
C:\Users\yuehchi\AppData\Local\Temp\RtmpSQ1800\downloaded_packages 裡
require(dplyr)
require(ggplot2)
require(data.table)
require(scales)
require(wordcloud2)
require(tidytext)
require(ltm)
require(rstatix)TB = read.csv('data.csv')
TB$單因子組別= factor(TB$單因子組別)
TB$雙因子組別= factor(TB$雙因子組別)
TB$time= factor(TB$time)head(TB)# cronbach alpha
head(TB[6:9])cronbach.alpha(TB[6:9], CI=TRUE, standardized=TRUE)
Standardized Cronbach's alpha for the 'TB[6:9]' data-set
Items: 4
Sample units: 120
alpha: 0.655
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.524 0.760
new_tb <- data.frame(TB$沉浸感1,TB$沉浸感3,TB$沉浸感4)
head(new_tb)cronbach.alpha(new_tb,CI= TRUE, standardized = TRUE)
Standardized Cronbach's alpha for the 'new_tb' data-set
Items: 3
Sample units: 120
alpha: 0.7
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.572 0.792
Items: 4 Sample units: 120 alpha: 0.655 alpha 沒有超過0.70,拿掉沉浸感2,再做一次 Items: 3 Sample units: 120 alpha: 0.7
# cronbach alpha
head(TB[16:18])cronbach.alpha(TB[16:18], CI=TRUE, standardized=TRUE)
Standardized Cronbach's alpha for the 'TB[16:18]' data-set
Items: 3
Sample units: 120
alpha: 0.823
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.762 0.871
Items: 3 Sample units: 120 alpha: 0.823
# cronbach alpha
head(TB[6:9])cronbach.alpha(TB[6:9], CI=TRUE, standardized=TRUE)
Standardized Cronbach's alpha for the 'TB[6:9]' data-set
Items: 4
Sample units: 120
alpha: 0.655
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.515 0.749
new_tb <- data.frame(TB$沉浸感1,TB$沉浸感3,TB$沉浸感4)
head(new_tb)cronbach.alpha(new_tb,CI= TRUE, standardized = TRUE)
Standardized Cronbach's alpha for the 'new_tb' data-set
Items: 3
Sample units: 120
alpha: 0.7
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.575 0.794
# 根據上面cronbach.alpha的結果,拿掉沉浸感2
TB <- transform(TB, all_immer = (TB$沉浸感1 + TB$沉浸感3 + TB$沉浸感4)/3)
Result = aov(TB$all_immer~TB$單因子組別)
model.tables(Result,type="means")Tables of means
Grand mean
5.202778
TB$單因子組別
TB$單因子組別
N S
4.989 5.417
get_summary_stats(group_by(TB, 單因子組別, ), all_immer, type = "mean_sd")
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$單因子組別 1 5.49 5.490 4.558 0.0348 *
Residuals 118 142.13 1.205
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- 結果: One-way Anova (單因子分析: 加總平均主題分數)
- 不切換場景與切換場景 -> 沉浸感
- 顯著差異: Pr(>F) 0.0348 * (0.01 ’*’)
boxplot(formula = TB$all_immer ~TB$單因子組別,
data =TB,
xlab = "組別",
ylab = "沉浸感) -> 顯著性",
col = "gray")
ggplot(TB, aes(x = 單因子組別, y = all_immer)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))# cronbach alpha
head(TB[16:18])cronbach.alpha(TB[16:18], CI=TRUE, standardized=TRUE)
Standardized Cronbach's alpha for the 'TB[16:18]' data-set
Items: 3
Sample units: 120
alpha: 0.823
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.753 0.872
TB <- transform(TB, all_creative = (TB$想法數量 + TB$品質 + TB$創造力)/3)
Result = aov(TB$all_creative~TB$單因子組別)
get_summary_stats(group_by(TB, 單因子組別, ), all_creative, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$單因子組別 1 5.49 5.490 5.482 0.0209 *
Residuals 118 118.18 1.001
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- 結果: One-way Anova (單因子分析: 加總平均主題分數)
- 不切換場景與切換場景 -> 創造力
- 顯著差異: Pr(>F) 0.0209 * (0.01 ’*’)
boxplot(formula = TB$all_creative ~TB$單因子組別,
data =TB,
xlab = "組別",
ylab = "自我創造力) -> 顯著性",
col = "gray")
ggplot(TB, aes(x = 單因子組別, y = all_creative)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$精神需求~TB$單因子組別)
get_summary_stats(group_by(TB, 單因子組別, ), 精神需求, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$單因子組別 1 4.8 4.800 3.506 0.0636 .
Residuals 118 161.6 1.369
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- 結果: One-way Anova (單因子分析: 各項題目)
- 不切換場景與切換場景 -> 精神需求
- 顯著: Pr(>F) 0.0636 . (0.05 ‘.’)
boxplot(formula = TB$精神需求 ~TB$單因子組別,
data =TB,
xlab = "組別",
ylab = "精神需求",
col = "gray")
ggplot(TB, aes(x = 單因子組別, y = 精神需求)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$體力需求~TB$單因子組別)
get_summary_stats(group_by(TB, 單因子組別, ), 體力需求, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$單因子組別 1 0.1 0.075 0.026 0.871
Residuals 118 335.9 2.846
- 結果: One-way Anova (單因子分析: 各項題目)
- 不切換場景與切換場景 -> 體力需求
- 不顯著: Pr(>F) 0.871
boxplot(formula = TB$體力需求 ~TB$單因子組別,
data =TB,
xlab = "組別",
ylab = "體力需求",
col = "gray")
ggplot(TB, aes(x = 單因子組別, y = 體力需求)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))
Result = aov(TB$時間壓力~TB$單因子組別)
get_summary_stats(group_by(TB, 單因子組別, ), 時間壓力, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$單因子組別 1 2.7 2.700 1.168 0.282
Residuals 118 272.8 2.312
- 結果: One-way Anova (單因子分析: 各項題目)
- 不切換場景與切換場景 -> 時間壓力
- 不顯著: Pr(>F) 0.282
boxplot(formula = TB$時間壓力 ~TB$單因子組別,
data =TB,
xlab = "組別",
ylab = "時間壓力",
col = "gray")
ggplot(TB, aes(x = 單因子組別, y = 時間壓力)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$成功~TB$單因子組別)
get_summary_stats(group_by(TB, 單因子組別, ), 成功, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$單因子組別 1 1.01 1.008 0.784 0.378
Residuals 118 151.78 1.286
- 結果: One-way Anova (單因子分析: 各項題目)
- 不切換場景與切換場景 -> 成功
- 不顯著: Pr(>F) 0.378
boxplot(formula = TB$成功 ~TB$單因子組別,
data =TB,
xlab = "組別",
ylab = "成功",
col = "gray")
ggplot(TB, aes(x = 單因子組別, y = 成功)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))
Result = aov(TB$努力~TB$單因子組別)
get_summary_stats(group_by(TB, 單因子組別, ), 努力, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$單因子組別 1 4.03 4.033 3.89 0.0509 .
Residuals 118 122.33 1.037
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- 結果: One-way Anova (單因子分析: 各項題目)
- 不切換場景與切換場景 -> 努力
- 顯著: Pr(>F) 0.0509 . (0.05 ‘.’)
boxplot(formula = TB$努力 ~TB$單因子組別,
data =TB,
xlab = "組別",
ylab = "努力",
col = "gray")
ggplot(TB, aes(x = 單因子組別, y = 努力)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$不安~TB$單因子組別)
get_summary_stats(group_by(TB, 單因子組別, ), 不安, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$單因子組別 1 3.01 3.008 1.226 0.27
Residuals 118 289.58 2.454
- 結果: One-way Anova (單因子分析: 各項題目)
- 不切換場景與切換場景 -> 不安
- 不顯著: Pr(>F) 0.27
boxplot(formula = TB$不安 ~TB$單因子組別,
data =TB,
xlab = "組別",
ylab = "不安",
col = "gray")ggplot(TB, aes(x = 單因子組別, y = 不安)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))# cronbach alpha
head(TB[6:9])cronbach.alpha(TB[6:9], CI=TRUE, standardized=TRUE)
Standardized Cronbach's alpha for the 'TB[6:9]' data-set
Items: 4
Sample units: 120
alpha: 0.655
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.514 0.755
new_tb <- data.frame(TB$沉浸感1,TB$沉浸感3,TB$沉浸感4)
head(new_tb)cronbach.alpha(new_tb,CI= TRUE, standardized = TRUE)
Standardized Cronbach's alpha for the 'new_tb' data-set
Items: 3
Sample units: 120
alpha: 0.7
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.573 0.793
# 根據上面cronbach.alpha的結果,拿掉沉浸感2
TB <- transform(TB, all_immer = (TB$沉浸感1 + TB$沉浸感3 + TB$沉浸感4)/3)
Result = aov(TB$all_immer~TB$time)
get_summary_stats(group_by(TB, time, ), all_immer, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 0.68 0.675 0.542 0.463
Residuals 118 146.95 1.245
- 結果: One-way Anova (單因子分析: 加總平均主題分數)
- 電子鐘(顯性)(C) VS 炸彈(隱性)(B) -> 沉浸感
- 不顯著差異: Pr(>F) 0.463
boxplot(formula = TB$all_immer ~TB$time,
data =TB,
xlab = "組別",
ylab = "沉浸感) -> 顯著性",
col = "gray")
ggplot(TB, aes(x = time, y = all_immer)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))# cronbach alpha
head(TB[16:18])cronbach.alpha(TB[16:18], CI=TRUE, standardized=TRUE)
Standardized Cronbach's alpha for the 'TB[16:18]' data-set
Items: 3
Sample units: 120
alpha: 0.823
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.750 0.873
TB <- transform(TB, all_creative = (TB$想法數量 + TB$品質 + TB$創造力)/3)
Result = aov(TB$all_creative~TB$time)
get_summary_stats(group_by(TB, time, ), all_creative, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 0.58 0.5787 0.555 0.458
Residuals 118 123.09 1.0431
- 結果: One-way Anova (單因子分析: 加總平均主題分數)
- 電子鐘(顯性)(C) VS 炸彈(隱性)(B) -> 創造力
- 不顯著差異: Pr(>F) 0.458
boxplot(formula = TB$all_creative ~TB$time,
data =TB,
xlab = "組別",
ylab = "自我創造力) -> 顯著性",
col = "gray")
ggplot(TB, aes(x = time, y = all_creative)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$精神需求~TB$time)
get_summary_stats(group_by(TB, time, ), 精神需求, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 0.53 0.5333 0.379 0.539
Residuals 118 165.83 1.4054
- 結果: One-way Anova (單因子分析: 各項題目)
- 電子鐘(顯性)(C) VS 炸彈(隱性)(B) -> 精神需求
- 不顯著: Pr(>F) 0.539
boxplot(formula = TB$精神需求 ~TB$time,
data =TB,
xlab = "組別",
ylab = "精神需求",
col = "gray")
ggplot(TB, aes(x = time, y = 精神需求)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$體力需求~TB$time)
get_summary_stats(group_by(TB, time, ), 體力需求, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 0.1 0.075 0.026 0.871
Residuals 118 335.9 2.846
- 結果: One-way Anova (單因子分析: 各項題目)
- 電子鐘(顯性)(C) VS 炸彈(隱性)(B) -> 體力需求
- 不顯著: Pr(>F) 0.871
boxplot(formula = TB$體力需求 ~TB$time,
data =TB,
xlab = "組別",
ylab = "體力需求",
col = "gray")
ggplot(TB, aes(x = time, y = 體力需求)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))
Result = aov(TB$時間壓力~TB$time)
get_summary_stats(group_by(TB, time, ), 時間壓力, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 0.3 0.300 0.129 0.72
Residuals 118 275.2 2.332
- 結果: One-way Anova (單因子分析: 各項題目)
- 電子鐘(顯性)(C) VS 炸彈(隱性)(B) -> 時間壓力
- 不顯著: Pr(>F) 0.72
boxplot(formula = TB$時間壓力 ~TB$time,
data =TB,
xlab = "組別",
ylab = "時間壓力",
col = "gray")
ggplot(TB, aes(x = time, y = 時間壓力)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$成功~TB$time)
get_summary_stats(group_by(TB, time, ), 成功, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 3.67 3.675 2.908 0.0908 .
Residuals 118 149.12 1.264
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- 結果: One-way Anova (單因子分析: 各項題目)
- 電子鐘(顯性)(C) VS 炸彈(隱性)(B) -> 成功
- 顯著: Pr(>F) 0.0908 . (0.05 ‘.’)
boxplot(formula = TB$成功 ~TB$time,
data =TB,
xlab = "組別",
ylab = "成功",
col = "gray")
ggplot(TB, aes(x = time, y = 成功)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))
Result = aov(TB$努力~TB$time)
get_summary_stats(group_by(TB, time, ), 努力, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 1.63 1.633 1.545 0.216
Residuals 118 124.73 1.057
- 結果: One-way Anova (單因子分析: 各項題目)
- 電子鐘(顯性)(C) VS 炸彈(隱性)(B) -> 努力
- 不顯著: Pr(>F) 0.216
boxplot(formula = TB$努力 ~TB$time,
data =TB,
xlab = "組別",
ylab = "努力",
col = "gray")
ggplot(TB, aes(x = time, y = 努力)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$不安~TB$time)
get_summary_stats(group_by(TB, time, ), 不安, type = "mean_sd")summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 3.01 3.008 1.226 0.27
Residuals 118 289.58 2.454
- 結果: One-way Anova (單因子分析: 各項題目)
- 不切換場景與切換場景 -> 不安
- 不顯著: Pr(>F) 0.27
boxplot(formula = TB$不安 ~TB$time,
data =TB,
xlab = "組別",
ylab = "不安",
col = "gray")
ggplot(TB, aes(x = time, y = 不安)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))NC -> 不切換場景 + 電子鐘 NB -> 不切換場景 + 炸彈 SC -> 切換場景 + 電子鐘 SB -> 切換場景 + 炸彈
# cronbach alpha
head(TB[6:9])cronbach.alpha(TB[6:9], CI=TRUE, standardized=TRUE)
Standardized Cronbach's alpha for the 'TB[6:9]' data-set
Items: 4
Sample units: 120
alpha: 0.655
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.523 0.762
new_tb <- data.frame(TB$沉浸感1,TB$沉浸感3,TB$沉浸感4)
head(new_tb)cronbach.alpha(new_tb,CI= TRUE, standardized = TRUE)
Standardized Cronbach's alpha for the 'new_tb' data-set
Items: 3
Sample units: 120
alpha: 0.7
Bootstrap 95% CI based on 1000 samples
2.5% 97.5%
0.578 0.791
# 根據上面cronbach.alpha的結果,拿掉沉浸感2
TB <- transform(TB, all_immer = (TB$沉浸感1 + TB$沉浸感3 + TB$沉浸感4)/3)
Result = aov(TB$all_immer~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 6.17 2.055 1.685 0.174
Residuals 116 141.46 1.219
- 結果: One-way Anova (雙因子分析: 加總平均主題分數)
- 不切換場景、切換場景、炸彈、電子鐘 -> 沉浸感
- 不顯著: Pr(>F) 0.174
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$all_immer ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.1555556 -0.8987810 0.5876699 0.9475692
SB-NB 0.4222222 -0.3210033 1.1654477 0.4523339
SC-NB 0.2777778 -0.4654477 1.0210033 0.7643641
SB-NC 0.5777778 -0.1654477 1.3210033 0.1842976
SC-NC 0.4333333 -0.3098922 1.1765588 0.4290363
SC-SB -0.1444444 -0.8876699 0.5987810 0.9573703
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$all_immer ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "沉浸感) -> 顯著性",
col = "gray")
ggplot(TB, aes(x = 雙因子組別, y = all_immer)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))NA
NA
NATB <- transform(TB, all_creative = (TB$想法數量 + TB$品質 + TB$創造力)/3)
Result = aov(TB$all_creative~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 6.11 2.038 2.011 0.116
Residuals 116 117.55 1.013
- 結果: One-way Anova (雙因子分析: 加總平均主題分數)
- 不切換場景、切換場景、炸彈、電子鐘 -> 創造力
- 不顯著: Pr(>F) 0.116
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$all_creative ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.1777778 -0.8553028 0.4997472 0.9030170
SB-NB 0.3888889 -0.2886361 1.0664139 0.4431012
SC-NB 0.2888889 -0.3886361 0.9664139 0.6832345
SB-NC 0.5666667 -0.1108583 1.2441917 0.1348794
SC-NC 0.4666667 -0.2108583 1.1441917 0.2807724
SC-SB -0.1000000 -0.7775250 0.5775250 0.9805459
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$all_creative ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "自我創造力) -> 顯著性",
col = "gray")
ggplot(TB, aes(x = 雙因子組別, y = all_creative)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))NA
NAResult = aov(TB$沉浸感1~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 1.1 0.3667 0.168 0.918
Residuals 116 253.3 2.1833
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> -> 在進行VR頭腦風暴時,我可以像在現實世界中一樣與環境互動
- 不顯著: Pr(>F) 0.918
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$沉浸感1 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB 1.000000e-01 -0.8944881 1.0944881 0.9936597
SB-NB 2.666667e-01 -0.7278215 1.2611548 0.8972857
SC-NB 1.000000e-01 -0.8944881 1.0944881 0.9936597
SB-NC 1.666667e-01 -0.8278215 1.1611548 0.9719785
SC-NC 1.776357e-15 -0.9944881 0.9944881 1.0000000
SC-SB -1.666667e-01 -1.1611548 0.8278215 0.9719785
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$沉浸感1 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "在進行VR頭腦風暴時,我可以像在現實世界中一樣與環境互動",
col = "gray")Result = aov(TB$沉浸感2~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 22.83 7.611 4.821 0.00336 **
Residuals 116 183.13 1.579
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 在進行VR頭腦風暴時,我感覺與外界隔絕
- 顯著: Pr(>F) 0.00336 ** (0.001 ’**’)
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$沉浸感2 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB 0.1000000 -0.74565708 0.9456571 0.9897915
SB-NB 0.9666667 0.12100959 1.8123237 0.0182147
SC-NB 0.8666667 0.02100959 1.7123237 0.0423448
SB-NC 0.8666667 0.02100959 1.7123237 0.0423448
SC-NC 0.7666667 -0.07899041 1.6123237 0.0900841
SC-SB -0.1000000 -0.94565708 0.7456571 0.9897915
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$沉浸感2 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "在進行VR頭腦風暴時,我感覺與外界隔絕",
col = "gray")
ggplot(TB, aes(x = 雙因子組別, y = 沉浸感2)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))NA
NAResult = aov(TB$沉浸感3~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 7.76 2.586 1.827 0.146
Residuals 116 164.17 1.415
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 在進行VR頭腦風暴時,我完全沉浸其中
- 不顯著: Pr(>F) 0.146
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$沉浸感3 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.4000000 -1.2006691 0.4006691 0.5633784
SB-NB 0.2666667 -0.5340025 1.0673358 0.8212559
SC-NB 0.1666667 -0.6340025 0.9673358 0.9483579
SB-NC 0.6666667 -0.1340025 1.4673358 0.1376779
SC-NC 0.5666667 -0.2340025 1.3673358 0.2578586
SC-SB -0.1000000 -0.9006691 0.7006691 0.9880224
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$沉浸感3 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "在進行VR頭腦風暴時,我完全沉浸其中",
col = "gray")Result = aov(TB$沉浸感4~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 16.97 5.656 2.33 0.078 .
Residuals 116 281.53 2.427
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 在進行VR頭腦風暴時,我忘記了我的日常煩惱
- 顯著: Pr(>F) 0.078 . (0.05 ‘.’)
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$沉浸感4 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.1666667 -1.2151837 0.8818504 0.9759169
SB-NB 0.7333333 -0.3151837 1.7818504 0.2677889
SC-NB 0.5666667 -0.4818504 1.6151837 0.4964747
SB-NC 0.9000000 -0.1485171 1.9485171 0.1193105
SC-NC 0.7333333 -0.3151837 1.7818504 0.2677889
SC-SB -0.1666667 -1.2151837 0.8818504 0.9759169
plot(TukeyHSD(Result),las=1)
boxplot(formula = TB$沉浸感4 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "在進行VR頭腦風暴時,我忘記了我的日常煩惱",
col = "gray")
ggplot(TB, aes(x = 雙因子組別, y = 沉浸感4)) + # Draw ggplot2 boxplot
geom_boxplot() +
stat_summary(fun = mean, geom = "point", col = "red") + # Add points to plot
stat_summary(fun = mean, geom = "text", col = "red", # Add text to plot
vjust = 1.5, aes(label = paste("Mean:", round(after_stat(y), digits = 1))))Result = aov(TB$精神需求~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 5.37 1.789 1.289 0.282
Residuals 116 161.00 1.388
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 精神需求
- 不顯著: Pr(>F) 0.282
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$精神需求 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.1000000 -0.8929093 0.6929093 0.9876771
SB-NB 0.4333333 -0.3595760 1.2262427 0.4866914
SC-NB 0.2666667 -0.5262427 1.0595760 0.8169323
SB-NC 0.5333333 -0.2595760 1.3262427 0.3012427
SC-NC 0.3666667 -0.4262427 1.1595760 0.6246785
SC-SB -0.1666667 -0.9595760 0.6262427 0.9469420
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$精神需求 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "精神需求",
col = "gray")
Result = aov(TB$體力需求~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 0.6 0.1861 0.064 0.979
Residuals 116 335.4 2.8911
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 體力需求
- 不顯著: Pr(>F) 0.979
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$體力需求 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB 1.666667e-01 -0.9777141 1.3110474 0.9812817
SB-NB 6.666667e-02 -1.0777141 1.2110474 0.9987454
SC-NB 1.776357e-15 -1.1443807 1.1443807 1.0000000
SB-NC -1.000000e-01 -1.2443807 1.0443807 0.9958121
SC-NC -1.666667e-01 -1.3110474 0.9777141 0.9812817
SC-SB -6.666667e-02 -1.2110474 1.0777141 0.9987454
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$體力需求 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "體力需求",
col = "gray")Result = aov(TB$時間壓力~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 4.2 1.400 0.599 0.617
Residuals 116 271.3 2.338
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 時間壓力
- 不顯著: Pr(>F) 0.617
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$時間壓力 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB 0.1 -0.9292214 1.1292214 0.9942702
SB-NB 0.5 -0.5292214 1.5292214 0.5861367
SC-NB 0.2 -0.8292214 1.2292214 0.9573866
SB-NC 0.4 -0.6292214 1.4292214 0.7421292
SC-NC 0.1 -0.9292214 1.1292214 0.9942702
SC-SB -0.3 -1.3292214 0.7292214 0.8722848
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$時間壓力 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "時間壓力",
col = "gray")Result = aov(TB$成功~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 6.09 2.031 1.606 0.192
Residuals 116 146.70 1.265
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 成功
- 不顯著: Pr(>F) 0.192
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$成功 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.13333333 -0.8902109 0.6235443 0.9677003
SB-NB 0.03333333 -0.7235443 0.7902109 0.9994559
SC-NB -0.53333333 -1.2902109 0.2235443 0.2615121
SB-NC 0.16666667 -0.5902109 0.9235443 0.9396616
SC-NC -0.40000000 -1.1568776 0.3568776 0.5159010
SC-SB -0.56666667 -1.3235443 0.1902109 0.2125795
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$成功 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "成功",
col = "gray")
Result = aov(TB$努力~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 5.97 1.989 1.916 0.131
Residuals 116 120.40 1.038
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 努力
- 不顯著: Pr(>F) 0.131
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$努力 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.3333333 -1.01901705 0.3523504 0.5855937
SB-NB 0.2666667 -0.41901705 0.9523504 0.7417309
SC-NB 0.1333333 -0.55235038 0.8190170 0.9573056
SB-NC 0.6000000 -0.08568371 1.2856837 0.1084581
SC-NC 0.4666667 -0.21901705 1.1523504 0.2910509
SC-SB -0.1333333 -0.81901705 0.5523504 0.9573056
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$努力 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "努力",
col = "gray")Result = aov(TB$不安~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 7.43 2.475 1.007 0.392
Residuals 116 285.17 2.458
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 不安
- 不顯著: Pr(>F) 0.392
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$不安 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.5333333 -1.588595 0.5219279 0.5537753
SB-NB -0.5333333 -1.588595 0.5219279 0.5537753
SC-NB -0.6333333 -1.688595 0.4219279 0.4029462
SB-NC 0.0000000 -1.055261 1.0552612 1.0000000
SC-NC -0.1000000 -1.155261 0.9552612 0.9946776
SC-SB -0.1000000 -1.155261 0.9552612 0.9946776
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$不安 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "不安",
col = "gray")Result = aov(TB$想法數量~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 7.0 2.333 1.569 0.201
Residuals 116 172.5 1.487
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 想法數量
- 不顯著: Pr(>F) 0.201
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$想法數量 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.4333333 -1.2539932 0.3873265 0.5166459
SB-NB 0.2000000 -0.6206598 1.0206598 0.9204289
SC-NB 0.1000000 -0.7206598 0.9206598 0.9888549
SB-NC 0.6333333 -0.1873265 1.4539932 0.1896463
SC-NC 0.5333333 -0.2873265 1.3539932 0.3314946
SC-SB -0.1000000 -0.9206598 0.7206598 0.9888549
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$想法數量 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "想法數量",
col = "gray")Result = aov(TB$品質~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 6.49 2.164 1.938 0.127
Residuals 116 129.50 1.116
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 想法品質
- 不顯著: Pr(>F) 0.127
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$品質 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB -0.1333333 -0.8444576 0.5777909 0.9614651
SB-NB 0.4333333 -0.2777909 1.1444576 0.3892237
SC-NB 0.3333333 -0.3777909 1.0444576 0.6142971
SB-NC 0.5666667 -0.1444576 1.2777909 0.1667158
SC-NC 0.4666667 -0.2444576 1.1777909 0.3228791
SC-SB -0.1000000 -0.8111242 0.6111242 0.9830876
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$品質 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "品質",
col = "gray")Result = aov(TB$創造力~TB$雙因子組別)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$雙因子組別 3 6.7 2.233 1.429 0.238
Residuals 116 181.3 1.563
- 結果: One-way Anova (雙因子分析: 各項題目)
- 不切換場景、切換場景、炸彈、電子鐘 -> 創造力
- 不顯著: Pr(>F) 0.238
TukeyHSD(Result) Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TB$創造力 ~ TB$雙因子組別)
$`TB$雙因子組別`
diff lwr upr p adj
NC-NB 0.03333333 -0.8080028 0.8746695 0.9996034
SB-NB 0.53333333 -0.3080028 1.3746695 0.3536891
SC-NB 0.43333333 -0.4080028 1.2746695 0.5378950
SB-NC 0.50000000 -0.3413362 1.3413362 0.4118208
SC-NC 0.40000000 -0.4413362 1.2413362 0.6032619
SC-SB -0.10000000 -0.9413362 0.7413362 0.9896372
plot(TukeyHSD(Result),las=1)boxplot(formula = TB$創造力 ~TB$雙因子組別,
data =TB,
xlab = "組別",
ylab = "創造力",
col = "gray")TB$time= factor(TB$time)
p <- ggplot(data =TB, aes(x = like,fill = time)) + geom_bar(position = "dodge")
p炸彈 B、電子鐘C -> 喜歡程度 1-7分 分布圖
var.test(TB$like~TB$time, data = TB) #函數 var.test()進行變異數同質性檢定
F test to compare two variances
data: TB$like by TB$time
F = 1.0481, num df = 59, denom df = 59, p-value = 0.8576
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
0.626026 1.754574
sample estimates:
ratio of variances
1.04805
# 炸彈 和 電子鐘 差異程度
t.test(TB$like~TB$time , var.equal = TRUE,data = TB) # t.test 結果顯示雙尾 TWO sample t-test , p-value 要小於0.05 才有顯著差異
Two Sample t-test
data: TB$like by TB$time
t = 0.42491, df = 118, p-value = 0.6717
alternative hypothesis: true difference in means between group B and group C is not equal to 0
95 percent confidence interval:
-0.3660421 0.5660421
sample estimates:
mean in group B mean in group C
4.833333 4.733333
炸彈 B、電子鐘C -> 喜歡程度 t-test 不顯著 p-value = 0.6717
boxplot(formula = TB$like~TB$time,
data =TB,
xlab = "組別",
ylab = "喜歡程度。",
col = "gray")NA
NAt.test(TB$like~TB$time , var.equal = TRUE,alt= "greater",data = TB) # 單尾檢定
Two Sample t-test
data: TB$like by TB$time
t = 0.42491, df = 118, p-value = 0.3358
alternative hypothesis: true difference in means between group B and group C is greater than 0
95 percent confidence interval:
-0.2901671 Inf
sample estimates:
mean in group B mean in group C
4.833333 4.733333
Result = aov(TB$like~TB$time)
summary(Result) Df Sum Sq Mean Sq F value Pr(>F)
TB$time 1 0.3 0.300 0.181 0.672
Residuals 118 196.1 1.662