Factor analysis

241 views
Skip to first unread message

Jessica Koh

unread,
Jun 25, 2016, 6:18:27 PM6/25/16
to julia-stats
Hello,

Is factor analysis currently being developed?

Diego Javier Zea

unread,
Jun 25, 2016, 7:54:13 PM6/25/16
to julia-stats
Hi Jessica

I didn't find a Julia implementation. It's mentioned in the future plans for MultivariateStats.jl and there is (not merged) PR in that package
It's implemented in scikit-learn, so you can used from Julia with: https://github.com/cstjean/ScikitLearn.jl

Best,

colint...@gmail.com

unread,
Jun 26, 2016, 7:43:04 PM6/26/16
to julia-stats
I haven't seen anything yet on traditional common factor analysis by maximum likelihood. Depending on your problem, you might be able to use principal components instead which is implemented in MultivariateStats.jl... e.g. in dual-asymptotic framework, simple transformations of the first k principal components are consistent estimators of the space-spanned by a k-dimensional common factor space.

Cheers,

Colin

Cedric St-Jean

unread,
Jun 26, 2016, 8:20:41 PM6/26/16
to julia-stats
You can also look into Madeleine Udell's LowRankModels.jl. It doesn't contain factor analysis, but unless I'm mistaken it should be possible to formulate it by specifying the objective function and regularizers appropriately

Alex Williams

unread,
Jun 26, 2016, 8:22:46 PM6/26/16
to julia...@googlegroups.com

Hey Colin - could you send a link or reference to that? Sounds like something I'd like to read up on.

I'd really like to see a solid factor analysis implementation soon. As Diego said I think SciKitLearn.jl is the best stopgap option at the moment.

--
You received this message because you are subscribed to the Google Groups "julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-stats...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Williams

unread,
Jun 26, 2016, 8:28:08 PM6/26/16
to julia...@googlegroups.com

@Cedric - I don't think Madeleine's framework includes factor analysis at the moment. Particularly if there is missing data one would have to iteratively alternate between estimating the mean/variance of each feature and the factors.

--

colint...@gmail.com

unread,
Jun 26, 2016, 9:04:02 PM6/26/16
to julia-stats
Sure, no problems. The gentlest introduction I know of (and it is still fairly heavy reading) is Bai, Ng (2006) "Evaluating Latent and Observed Factors in Macroeconomics and Finance" in the Journal of Econometrics. It contains references to all the really heavy theoretical papers too if you're interested. Probably also worth mentioning Bai, Ng (2002) "Determining the Number of Factors in an Approximate Factor Model" in Econometrica, as this material is necessary to consistently estimate the dimension of the common factor space.

If you don't have access to these journals, Serena Ng has pdfs and matlab code for both papers at her homepage here: http://www.columbia.edu/~sn2294/pub.html

At some point or other I implemented the techniques in both papers in matlab code too (Serena didn't have matlab code available at the time) so let me know if you want a copy (I didn't get round to posting it on file-exchange). If I had more free time I would probably have already made a Julia package of this stuff, but kids = no free time :-)

Cheers,

Colin

Alan Crawford

unread,
Jun 28, 2016, 1:51:34 PM6/28/16
to julia-stats
To those interested in factor models you may find Matthieu Gomez's SparseFactorModels.jl useful.

Best
Alan

parthasarathy ganguly

unread,
Sep 21, 2016, 6:54:57 AM9/21/16
to julia-stats
I found the easiest way to do factor analysis is to call r using RCall and enter $ sign. Then you can use r code and do factor analysis.
Reply all
Reply to author
Forward
0 new messages