[R] Test on mu with multivariate normal distribution

Telse Henschel telsehenschel at web.de
Sat May 7 13:30:17 CEST 2005


Dear WizaRds,

I am sorry to bother you with a newbie question, but although I tried to solve my problem using the various .pdf files (Introduction, help pages etc.), I have come to a complete stop. Please be so kind as to guide me a little bit along my way of exploring multivariate analysis in R.

I want to test wether the means-vector mu1 of  X, consisting of the means per column of that matrix , and mu2, i.e. the means per column of Y,  are distributed equally  under the assumption of a multivariate normal distribution. I thought “simtest” could be the right function to get the p-value, but I fail to use R correctly. Here is what I tried to do:

f1		<- factor(c("8", "10", "12", "14"))

X		<- matrix(1:16, ncol=4)
colnames(X)	<- c("Obj1","Obj2","Obj3","Obj4")
X.frame	<- data.frame(f1,X)

Y		<- matrix(1:12, ncol=4)
colnames(Y)	<- c("Obj1","Obj2","Obj3","Obj4")
Y.frame	<- data.frame(f1,Y)
XY		<- data.frame(X.frame, Y.frame) # won’t work, because of different nr of rows

test.stat	<- lm(XY ~ f1)	# ???

# simtest(test.stat, XY, type="Tukey")

creates errors already by just staring at it. I apologize.


Thank you so much for your support,
Telse




More information about the R-help mailing list