Displaying 1 result from an estimated 1 matches for "hotell3".
Did you mean:
hotell
1998 Nov 16
0
Re: Hotelling corrected
...<- xbar2-xbar1
v <- ((n1-1)*var(d1)+(n2-1)*var(d2))/(n1+n2-2)
t2 <- n1*n2*dbar%*%solve(v)%*%dbar/(n1+n2)
f <- (n1+n2-k-1)*t2/((n1+n2-2)*k)
cat("F:",f,"\n")
cat("PROBABILITY:",1-pf(f,k,n1+n2-k-1),"\n")
}
> source("c:/r/hotell3")
> d1 <- read.table("c:/r/a.dat")
> d2 <- read.table("c:/r/b.dat")
> hotelling(d1,d2)
F: 1.797264
PROBABILITY: 0.1575505
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.a...