markheckmann / OpenRepGrid

An R package for the analysis of repertory grids
http://markheckmann.github.io/OpenRepGrid/
GNU General Public License v2.0
16 stars 7 forks source link

Wrong value in indexPvaff? #28

Closed MindCartographer closed 4 years ago

MindCartographer commented 4 years ago

Hi Mark,

I think there is a significant mismatch between the value we get through indexPvaff and the one shown in the x axis of the biplot2d. An example below.

The value reported by RECORD 6 (GRIDCOR 6) matches the one in the biplot2d, so maybe the calculation behind indexPvaff should be reviewed. [Note: Gridcor 6 uses Correspondence Analysis instead of the ORG Principal Component Analysis].

image

image

Thanks for your work, José A. González Del Puerto Psychology PhD Student

markheckmann commented 4 years ago

Dear José, thanks for your comments. indexPvaff was based on the SVD of the construct correlation matrix. I changed that to the PCA of the construct centered raw data as default method in this commit. The PVAFF value now matches the biplot2d output. The old method is still available by setting method = 2.

Thanks a lot for your comments!

> file <-   ##"Sarah PRE - For R.xlsx"
> x <- importExcel(file)
> indexPvaff(x)
Note: As of v0.1.14 PVAFF is derived using PCA of the construct centered ratings by default. Before that the construct correlation matrix was used (see method=2).

[1] 0.4903784