Am 14.11.2024 um 12:13 schrieb Artur T.:
Am 14.11.24 um 11:57 schrieb Riccardo (Jack) Lucchetti:
>
> 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;
I guess if these built-ins were to be extended, then it would have to be
both, not just one of them.
> 3) create a small self-contained function package;
> 4) integrate the code into the existing "staticfactor" function package.
If it's not going to be native, then I would like 4 better than 3.
without having looked at your code. BUT, just in case we decide for a
new package, your code and my unpublished pcaTools package may be merged:
https://github.com/atecon/pcaTools
Thanks, Artur, your description there sounds as if we don't have the
Scree plot anywhere yet. Note that it is available in "staticfactor", too.
The biplot thing may be nice to have, though.
By the way, the pcaTools package includes a very ad hoc implementation
of sparse-PCA based on my very superficial understanding of some paper
by Tibshirani or so). To be hones, I do not know whether this actually
is a statistically valid implementation of his and others work.
Well, it would be nice to have a reference where the forward boosting is
applied to PCA. However, I remember that I have seen quite a few papers
dealing with similar approaches, and I wouldn't be surprised if it "just
works".
thanks
sven