[R] Multiple correspondence analysis

Bernardo Rangel Tura tura at centroin.com.br
Sun Jan 13 11:43:19 CET 2008


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


More information about the R-help mailing list