[R] Multiple correspondence analysis

From: Bernardo Rangel Tura <tura_at_centroin.com.br>
Date: Sun, 13 Jan 2008 08:43:19 -0200


Hi R-people,

I try using mca (multiple correspondence analysis) in evocation data (data base feminino2.csv attach in this mail).

Well in this database have 4 evocations for each 120 persons.

If I use this script:

base<-read.csv("feminino2.csv")

require(MASS)

plot(mca(base,abbrev=T),rows = F)

Work, but result in a ugly plot, so I try extract levels with low frequency:

niveis<-unique(c(levels(base$p1),levels(base$p2),levels(base
$p3),levels(base$p4)))

v<-table(factor(base$p1,levels=niveis))+ table(factor(base
$p2,levels=niveis))+table(factor(base$p3,levels=niveis))+

n2<-niveis[v>=5] #where 5 is cutoff frequency

evoc.df<-data.frame(factor(base$p1,levels=n2),factor(base
$p2,levels=n2),factor(base$p3,levels=n2),factor(base$p4,levels=n2))

names(evoc.df)<-c("p1","p2","p3","p4")

plot(mca(evoc.df,abbrev=T),rows = F)

Don't work and result in a error:

Error in svd(X) : infinite or missing values in 'x'

Where I worng? Anybody help me?

Thanks in advance

-- 
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil

______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Sun 13 Jan 2008 - 10:54:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Jan 2008 - 13:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive