Skip to content

Str info. Thanks for helping

1 message · Ivan Calandra

#
Hi William!

So... many things to say

First, your first steps are completely unnecessary.
Just do this:
data1 <- read.csv(file.choose(), header=TRUE)
data1$IND <- factor(data1$IND)
M <- manova(as.matrix(data1[,-1])~data1$IND, data=data1)

Though I don't understand why this doesn't work:
M <- manova(.~IND, data=data1)
Error in eval(expr, envir, enclos) : object '.' not found

Second, this doesn't work either:
S<-summary(M, test="Pillai")
Error in summary.manova(M, test = "Pillai") : residuals have rank 11 < 12
And I don't know what that means since I never do manova, but it's not 
really where you're stuck, I guess

Third, where you're stuck. Is this what you want?
SA<-summary.aov(M)
out <- lapply(seq_along(SA), FUN=function(x) unlist(SA[[x]][1,]))
mat <- do.call("rbind", out)
row.names(mat) <- names(SA)

Fourth, I wouldn't use as.vector(). I'm no R expert, but I have the 
impression that it is useless in this case. It probably has its use in 
some situations, but I think as.matrix(), as.data.frame() and so on 
would be more useful to you.

And last, reply to the list as well!! Since attached files are not 
transferred, copy the output from dput(data1) into the email, like this:
data1 <- structure(list(IND = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
...
"Dep1", "Dep2", "Dep3", "Dep4", "Dep5", "Dep6", "Dep7", "Dep8",
"Dep9", "Dep10", "Dep11", "Dep12"), row.names = c(NA, -133L), class = 
"data.frame")  ## copy the whole thing, right!!


HTH,
Ivan


Le 5/5/2011 02:41, Reith, William [USA] a ?crit :