top of page

data.ex=read.csv("Table825.csv",header=T)
data.ex

attach(data.ex)


fs <- factor(sub)
fc <- factor(cond)

#fc被験者内要因

#関数 aov(従属変数,要因,誤差項の指定,データ)

#誤差の指定 Error(被験者/要因):他の方法もある

aov.ex=aov(ill~fc+Error(fs/fc),data.ex)
summary(aov.ex)

# Holmの方法による多重比較の場合

#関数 perwise.t.test(従属変数,独立変数,データ,調整の方法p.adj = "方法")

pairwise.t.test(ill,cond,data=data.ex,p.adj = "holm")

​(参考)

ANOVA 被験者内2要因(星野祐司氏 ( 立命館大学))
http://www.psy.ritsumei.ac.jp/~hoshino/spss/anova02x.html

# data  anova02.csv

x<-read.csv("anova02.csv")
x

attach(x)

A <- factor(FACTOR_A)

B <- factor(FACTOR_B)

S <- factor(SUBJECT)

aov.ex=aov(DATA~(A*B)+Error(S/(A*B)),x)

summary(aov.ex)
 

2要因ANOVA(一要因に対応があり、一要因に対応なし)

# data  anova11.csv

x2<-read.csv("anova11.csv")

x2

attach(x2)

c<- factor(CONDTION)

i<- factor(INTERVAL)

s<- factor(SUBJECT)
 

aov.ex=aov(ACTIVITY~c*i+Error(s:c+s:i:c),x2)

summary(aov.ex)

bottom of page