Skip to content
Back to formatted view

Raw Message

Message-ID: <CAJrFtqKi5Z=N-81hpkr0m9PV-EF7dtxAp2DLVEOhpBdzAqT5tA@mail.gmail.com>
Date: 2020-08-25T05:05:13Z
From: Andrew Halford
Subject: incompatible dimensions error

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

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fish05.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200825/5a37d362/attachment.txt>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: env.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200825/5a37d362/attachment-0001.txt>