4
$\begingroup$

I have a large amount of variables (24) to predict a Y/N value, and I would like help for writting a procedure that automatically tries the different results of the factor selection to see how good the regression turns out to be, and of course I want to save the best model for later use.

$\endgroup$
4
$\begingroup$

First of all, consider if the factor analysis is the right way to do feature extraction. I would suggest to use principal component analysis to make dimension reduction first and then use extracted features as predictor variables. Depends on your settings you should also use appropriate cross-validation regime to access your prediction.

$\endgroup$
  • $\begingroup$ I would entirely agree with Andrej. This is one of those rare cases where principal components will probably do a better job than factor analysis. $\endgroup$ – richiemorrisroe Feb 7 '11 at 13:46
  • $\begingroup$ Sorry I have one doubt, should I include in PCA the variable I want to predict? $\endgroup$ – mariana soffer Feb 8 '11 at 1:58
  • $\begingroup$ No, leave your dependent variable (Y/N variable in your case) out of PCA dimension reduction. You can read my article about same topic at the goo.gl/lJh5s $\endgroup$ – Andrej Feb 8 '11 at 8:57
0
$\begingroup$

You could find useful the 'logisticPCA' package.

Is an R package for dimensionality reduction of binary data.

https://cran.r-project.org/web/packages/logisticPCA/vignettes/logisticPCA.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.