I want to use a MANOVA test in R to check for a statistical difference between a vector of means ("test") and a vector (of equal length) of '1's ("random"). My data is as below:
ID openwater closedshrubland barren cropnatural crop decidbroad mixed
test 0.8435707 1.037015 0.90612 0.8724474 0.9837284 1.035505 1.05059
random 1 1 1 1 1 1 1
When I run the following code:
manovares1 <- manova(cbind(openwater,closedshrubland,barren,cropnatural,crop,decidbroad,mixed) ~ as.factor(ID),data=test)
The print out gives me the following message:
Error in print.aov(list(coefficients = c(1, -0.156429334, 1, 0.0370145719999997, :
length of 'dimnames' [1] not equal to array extent
And the summary(manovares1)
gives:
Df
as.factor(ID) 1**
Any ideas what I am doing wrong? (A similar question was asked here, but the answer doesn't seem to help in my situation.
Thanks for any help you can offer!