[R] A small error in mca ?
Emmanuel Charpentier
emmanuel.charpentier at sap.ap-hop-paris.fr
Tue Jul 11 14:03:58 CEST 2000
Dear list,
Working the example in Stats complements to V&R 3rd ed., I found this :
> library(MASS)
> library(mva)
> data(farms)
> plot(mca(farms,abbrev=TRUE),cex=rep(0.7,2))
# ... Works OK
# Sheer curiosity ...
> plot(mca(farms,abbrev=TRUE,nf=4),cex=rep(0.7,2))
Error in rep(p * X.svd$d[sec], c(n, n)) : invalid number of copies in "rep"
A bit of exploration in the MASS source shows (12th line of the mca function
body) :
fs <- X.svd$u[, sec]/rep(p*X.svd$d[sec], c(n,n))
Shouldn't that be
fs <- X.svd$u[, sec]/rep(p*X.svd$d[sec], rep(n,nf))
that gives the expected result ?
Oh, BTW : Is mca identical or analogous to Benzecri's "analyse des
correspondances" (analysis of a chi-squared distance table), or is this yet
another analysis ?
Sincerely yours,
Emmanuel Charpentier
--
Emmanuel Charpentier Tel : +33-01 40 27 35 98
Secrétariat scientifique du CEDIT Fax : +33-01 40 27 55 65
Direction de la Politique Médicale // Assistance Publique - Hôpitaux de Paris
3, Avenue Victoria // F-75004 Paris /// France
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list