Project7

邱嘉品、莊耘

20180611

本組報告的研究案-臺南市智慧手環計畫

.

.

.

.

.

.

.

.

##.

資料的模擬與練習

library("fda")
Loading required package: splines
Loading required package: Matrix

Attaching package: 'fda'
The following object is masked from 'package:graphics':

    matplot
library("fdANOVA")
Warning: package 'fdANOVA' was built under R version 3.4.4
data(gait)
str(gait)
 num [1:20, 1:39, 1:2] 37 36 33 29 23 18 15 12 9 6 ...
 - attr(*, "dimnames")=List of 3
  ..$ : chr [1:20] "0.025" "0.075" "0.125" "0.175" ...
  ..$ : chr [1:39] "boy1" "boy2" "boy3" "boy4" ...
  ..$ : chr [1:2] "Hip Angle" "Knee Angle"
gait.data.frame <- as.data.frame(gait)
x.gait <- vector("list", 2)
x.gait[[1]] <- as.matrix(gait.data.frame[, 1:39])
x.gait[[2]] <- as.matrix(gait.data.frame[, 40:78])
group.label.gait <- rep(1:3, each = 13)

畫出FDANOVA

plotFANOVA(x = x.gait[[1]], int = c(0.025, 0.975))

分組畫出FDANOVA

plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait),
 int = c(0.025, 0.975))

分割成三個圖畫FDANOVA

plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait),
 int = c(0.025, 0.975), separately = TRUE)

分組並取平均

plotFANOVA(x = x.gait[[1]], group.label = as.character(group.label.gait),
 int = c(0.025, 0.975), means = TRUE)

FMANOVA − Tests based on k Random Projections

set.seed(123)
fmanova1 <- fmanova.trp(x.gait, group.label.gait, k = c(1, 5, 10, 15, 20))
fmanova2 <- fmanova.trp(x.gait, group.label.gait, k = c(1, 5, 10, 15, 20),
 permutation = TRUE)
plot(x = fmanova1, y = fmanova2)

FMANOVA − Tests based on k Random Projections withoutRoy

plot(x = fmanova1, y = fmanova2, withoutRoy = TRUE)

Plotting irregular functional data

Warning: package 'funData' was built under R version 3.4.4

Attaching package: 'funData'
The following object is masked from 'package:stats':

    integrate

顯示功能數據的匯總統計數據(最小值,第一分位數,中位數,平均值,第三分位數,最大值)和分位數

Warning: package 'rainbow' was built under R version 3.4.4
Loading required package: MASS
Loading required package: pcaPP
Warning: package 'pcaPP' was built under R version 3.4.4

Summary statistics for functional data 功能數據匯總統計

Singular value decomposition plot.不同分解圖

Functional Data t-test

Functional Data F-test

本組的報告到此結束,謝謝老師及同學的聆聽。