[R] testing significance of axis loadings from multivariate dudi.mix
mark_difford at yahoo.co.uk
Sun Nov 6 10:33:21 CET 2011
On Nov 05, 2011 at 11:01pm Francisco Mora Ardila wrote:
> But a problem arised with the predict function: it doesn´t seem to work
> with an object
> from dudi.mix and I dont understand why.
There is no predict() method for dudi.mix() or for any of the dudi objects
in ade4. I don't see why you can't get around this by doing something like
the following, but you need to take account of any scaling/centring that you
might do to your data before calling dudi.mix().
## Does a dudi.mix on continuous data, so really equals a
deug.dudi <- dudi.mix(deug$tab, scann=F, nf=2)
tt <- as.matrix(deug.dudi$tab) %*% as.matrix(deug.dudi$c1) ## see note
deug.princ <- princomp(deug$tab, cor=T)
## scaling not accounted for:
deug.princ <- princomp(deug$tab, cor=F)
rm(tt, deug.dudi, deug.princ)
Note that in the code given above, "as.matrix(deug.dudi$tab) %*%
as.matrix(deug.dudi$c1)" is based on how stats:::predict.princomp does it.
Mark Difford (Ph.D.)
Nelson Mandela Metropolitan University
Port Elizabeth, South Africa
View this message in context: http://r.789695.n4.nabble.com/testing-significance-of-axis-loadings-from-multivariate-dudi-mix-tp3994281p3995350.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help