jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

[Feature Request]: add 'semipartial correlation' analysis under regression #2244

Open cactuschef opened 1 year ago

cactuschef commented 1 year ago

Description

I would like the ability to do semipartial correlations in JASP. There is already the ability to do partial correlations which are similar, yet the two are distinctly different, and commonly used in results sections in journal articles. Under Regression -> Correlation - right at the top of the assignment box there is the 'variables' box, and right underneath that is 'partial out' box. I beleive a 'semipartial out' box would be fantastic to 'control out' any variables.

Purpose

Semipartial correlation analysis. Very important for statistical reporting of correlations

Use-case

for statistical correlational analysis

Is your feature request related to a problem?

No response

Is your feature request related to a JASP module?

Regression

Describe the solution you would like

Addition of a semipartial option for correlation analysis in JASP.

Describe alternatives that you have considered

I assume R-studio and SPSS can do it.

Additional context

For clarity here is the definition of the difference between 'partial correlation' and 'semipartial correlation'.

Here's a definition from Barbara Tabachnik & Linda Fidell's Using Multivariate Statistics, 6th Edition. (Section 5.6.1): 'The unique contribution of an IV to predicting a DV is generally assessed by either partial or semipartial correlation. For standard multiple and sequential regression, the relationships between correlation, partial correlation, and semipartial correlation are given in Figure 5.3 for a simple case of one DV and two IVs. In the figure, squared correlation, partial correlation, and semipartial correlation coefficients are defined as areas created by overlapping circles. Area a + b + c + d is the total area of the DV and reduces to a value of 1 in many equations. Area b is the segment of the variability of the DV that can be explained by either IV1 or IV2 and is the segment that creates the ambiguity. Notice that it is the denominators that change between squared semipartial and partial correlation. In a partial correlation, the contribution of the other IVs is taken out of both the IV and the DV. In a semipartial correlation, the contribution of other IVs is taken out of only the IV. Thus, squared semipartial correlation expresses the unique contribution of the IV to the total variance of the DV. Squared semipartial correlation (sr2i ) is the more useful measure of importance of an IV. The interpretation of sr2i differs, however, depending on the type of multiple regression employed.'

Ghassan-Okour commented 1 year ago

@cactuschef Thank you for your suggestion...

cactuschef commented 1 year ago

Thankyou, there's also the book by Andy Field, under Chapter 8, section 8.5: Partial and semi-partial correlation. I assume there's a fancy math / programming formula in there somewhere.

Field, & Field, A. P. (2018). Discovering statistics using IBM SPSS statistics (5th edition.). SAGE Publications.

Thanks, Ed.

TarandeepKang commented 1 year ago

Just a note for when one of the developers sees this request, this method is available in the following R package:

Kim, S. (2015). ppcor: An R Package for a Fast Calculation to Semi-partial Correlation Coefficients. Communications for Statistical Applications and Methods, 22(6), 665–674. https://doi.org/10.5351/CSAM.2015.22.6.665

see also

Kim, S. (2022). P-value calculation methods for semi-partial correlation coefficients. Communications for Statistical Applications and Methods, 29(3), 397–402. https://doi.org/10.29220/csam.2022.29.3.397