I have the following dataset :
MKT econ_unemp econ_gas open
504 0.0743088 3.461 38
504 0.0740673 3.448 38
504 0.0740673 3.455 38
504 0.0740673 3.42 38
504 0.072682 3.391 38
505 0.0692244 3.345 38
505 0.0692244 3.381 38
505 0.0692244 3.484 38
505 0.0692244 3.488 38
I need to run factor analysis on the 3 variables by market so I used the split function in R to split the data:
splitx<-split(data,data$DMA)
and then tried running factor analysis as follows:
for (i in 1:length(splitx)) {
fa <- factanal(splitx[[i]],factors =1)
}
But I am getting the following error:
Error in optim(start, FAfn, FAgr, method = "L-BFGS-B", lower = lower,:non-finite value supplied by optim
I hope the information provided is sufficient. Can someone help me fix this.
Regards