Hi Listers
Using mvpart to run a MV regression tree with PCA= TRUE to get a PCA
plotted with sites coloured according to the tree output.
Unfortunately it wont produce the PCA, instead giving the error message..
Error in cor(xall, xx[order(tree$where), ]) : incompatible dimensions.
However, when I run a PCA on the data using the rda command I have no
problems producing a PCA.
data is attached as a text file
my code is thus...
fish05.hel <- decostand(fish05,"hellinger")
fish05.mrt <-
mvpart(data.matrix(fish05.hel)~.,env,margin=0.08,cp=0,rsq=TRUE,xv="pick",xval=nrow(fish05),xvmult=100,which=4,pca=TRUE)
The tree is produced no problem but it wont produce a PCA.
I am just keen to understand what this error means as I dont see anything
unusual about the dataset used, notwithstanding the data is rather messy.
Andy
--
Andrew Halford Ph.D
Senior Coastal Fisheries Scientist
Pacific Community | Communaut? du Pacifique CPS ? B.P. D5 | 98848 Noumea,
New Caledonia | Noum?a, Nouvelle-Cal?donie