-
Notifications
You must be signed in to change notification settings - Fork 0
/
code
24 lines (24 loc) · 810 Bytes
/
code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(ICSNP)
t1=c(60,53,54,55,50,51,60,57,52,58,68,62,55)
t2=c(80,76,74,72,73,73,75,75,74,79,78,80,76)
t3=c(76,64,63,70,65,64,72,70,64,65,69,68,56)
t4=c(50,57,52,55,51,53,56,54,50,52,51,55,58)
t5=c(71,77,71,75,73,74,77,74,72,73,74,72,70)
t6=c(62,65,66,64,64,66,65,62,63,64,65,68,60)
N1=13
N2=15
v=sqrt(N1/N2)
y1=(t1-v*t4)
y2=(t2-v*t5)
y3=(t3-v*t6)
y1=c(13.4550,-0.0613,5.5932,3.8005,2.5241,1.6623,7.8696,6.7314,5.4550,9.5932,10.5241,10.8005,1.0078)
y2=c(13.9061,4.3207,7.9061,2.1825,5.0443,4.1134,3.3207,6.1134,6.9752,11.0443,9.1134,12.9752,10.8370)
y3=c(12.2842,3.4915,4.3533,10.4224,5.4224,2.5606,11.4915,12.2842,5.3533,5.4224,8.4915,4.6988,10.1460)
N1=13
N2=15
p=3
data=data.frame(y1,y2,y3)
HotellingsT2(data)
HotellingsT2(data, mu = NULL, test = "chi")
t2=104.84/(N1-1)*(N1-p)/(p)
qf(.95, df1=3, df2=10)