For some work I'm doing, I need to apply PCA to data containing missing
values. So I dug up some old code that I had around, which implements
Stock and Watson's EM algorithm (detailed in the 2002 JBES article).
I'm attaching a script with the function and an example if anyone's
interested.
Of course, it'd be nice to make this procedure more readily available to
gretl users. I see four (not mutually exclusive) ways of doing so:
1) modify our existing "pca" command to handle missing values;
2) modify our existing "princomp" function to handle missing values;
3) create a small self-contained function package;
4) integrate the code into the existing "staticfactor" function package.
Which one do you this is best?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------