[R] Test on mu with multivariate normal distribution

From: Telse Henschel <telsehenschel_at_web.de>
Date: Sat 07 May 2005 - 21:30:17 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat May 07 21:35:56 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:38 EST