0

I have the dataset below to perform complete analysis on it including Principal components analysis, correspondence analysis, Multiple correspondence analysis.

https://archive.ics.uci.edu/ml/datasets/Tarvel+Review+Ratings

I've found some problems in performing CA:

*first in understanding the dataset. We know that CA is for categorical variables, and in my dataset, as I understand, there's only one categorical variable which is the "attractions from 24 categories across Europe". so could it be that the 2nd categorical variable are the users perhaps?

*Another problem, using the R code below to perform the CA using the function ca() in FactoMiner Package, it gives me the error below:

Code R:

library(FactoMineR)
data <- read.csv(file.choose(),row.names=1)
View(data)
data.active<-data[,0:24]
res.data <-CA(data.active,graph = FALSE)
summary(res.data,nb.dec = 2)

Error:

res.data <-CA(data.active,graph = FALSE) Error in eigen(crossprod(t(X), t(X)), symmetric = TRUE) : infinite or missing values in 'x'

I don't understand what could it be the error. When I read the dataset and put it in the "data" variable, I find that another Column called "X" with N/A value in all of its cells. I didn't understand where it came from so I've used the "data.active" in the R code to delete column "X", and then I checked the data.active table if it contains any N/A values but it seems legit!

So anyone please can help me solving this problem, It'll be much appreciated. Thank you

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
hamza saber
  • 511
  • 1
  • 4
  • 18
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Have you checked if there are any missing values in your data set? The error makes it sound like there might be and you'd probably have to drop those records. – MrFlick Feb 04 '19 at 17:46
  • @MrFlick yes i checked my dataset if it contains any N/A values, i didn't find any N/A values. and i've put also the dataset and also the code that produces that error – hamza saber Feb 04 '19 at 18:46

0 Answers0