michaelgreenacre / CODAinPractice

Compositional Data Analysis in Practice
36 stars 10 forks source link

Weighted PCA with EasyCoda package #2

Open Ramon-88 opened 1 year ago

Ramon-88 commented 1 year ago

Dear professor Greenacre, first of all, thanks for your work and for having developed this amazing package "EasyCoda" that makes compositional data analysis more accessible and straightforward. My question doesn't concern problems with the package; instead, it's about conceptual aspects related to weighted PCA. I'm using the PCA function from EasyCodapackage to perform a weighted PCA on Clr log ratios by using weights for my observation (or rows). I'm trying to understand how the scores for each observation are calculated, as I would like to use the weighted PCA to create an index based on the row scores. I also had a look to appendix A of your "Compositional Data Analysis in Practice", but I'm not fully convinced I got the procedure.

So, to rephrase my question differently, if I added an observation (or a row) to my sample, what would be the equation I would have to calculate in order to assign it a score on the selected components? Thanks in advance for any help or suggestion