pcc: Partial Correlation Coefficients

View source: R/pcc.R

pccR Documentation

Partial Correlation Coefficients

Description

pcc computes the Partial Correlation Coefficients (PCC), Semi-Partial Correlation Coefficients (SPCC), Partial Rank Correlation Coefficients (PRCC) or Semi-Partial Rank Correlation Coefficients (SPRCC), which are variance-based measures based on linear (resp. monotonic) assumptions, in the case of (linearly) correlated factors.

Usage

pcc(X, y, rank = FALSE, semi = FALSE, logistic = FALSE, nboot = 0, conf = 0.95)
## S3 method for class 'pcc'
print(x, ...)
## S3 method for class 'pcc'
plot(x, ylim = c(-1,1), ...)
## S3 method for class 'pcc'
ggplot(data, mapping = aes(), ..., environment
                 = parent.frame(), ylim = c(-1,1))

Arguments

X

a data frame (or object coercible by as.data.frame) containing the design of experiments (model input variables).

y

a vector containing the responses corresponding to the design of experiments (model output variables).

rank

logical. If TRUE, the analysis is done on the ranks.

semi

logical. If TRUE, semi-PCC are computed.

logistic

logical. If TRUE, the analysis is done via a logistic regression (binomial GLM).

nboot

the number of bootstrap replicates.

conf

the confidence level of the bootstrap confidence intervals.

x

the object returned by pcc.

data

the object returned by pcc.

ylim

the y-coordinate limits of the plot.

mapping

Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot.

environment

[Deprecated] Used prior to tidy evaluation.

...

arguments to be passed to methods, such as graphical parameters (see par).

Details

Logistic regression model (logistic = TRUE) and rank-based indices (rank = TRUE) are incompatible.

Value

pcc returns a list of class "pcc", containing the following components:

call

the matched call.

PCC

a data frame containing the estimations of the PCC indices, bias and confidence intervals (if rank = TRUE and semi = FALSE).

PRCC

a data frame containing the estimations of the PRCC indices, bias and confidence intervals (if rank = TRUE and semi = FALSE).

SPCC

a data frame containing the estimations of the PCC indices, bias and confidence intervals (if rank = TRUE and semi = TRUE).

SPRCC

a data frame containing the estimations of the PRCC indices, bias and confidence intervals (if rank = TRUE and semi = TRUE).

Author(s)

Gilles Pujol and Bertrand Iooss

References

L. Clouvel, B. Iooss, V. Chabridon, M. Il Idrissi and F. Robin, 2023, An overview of variance-based importance measures in the linear regression context: comparative analyses and numerical tests, Preprint. https://hal.science/hal-04102053

B. Iooss, V. Chabridon and V. Thouvenot, Variance-based importance measures for machine learning model interpretability, Congres lambda-mu23, Saclay, France, 10-13 octobre 2022 https://hal.science/hal-03741384

J.W. Johnson and J.M. LeBreton, 2004, History and use of relative importance indices in organizational research, Organizational Research Methods, 7:238-257.

A. Saltelli, K. Chan and E. M. Scott eds, 2000, Sensitivity Analysis, Wiley.

See Also

src, lmg, pmvd

Examples


# a 100-sample with X1 ~ U(0.5, 1.5)
#                   X2 ~ U(1.5, 4.5)
#                   X3 ~ U(4.5, 13.5)
library(boot)
n <- 100
X <- data.frame(X1 = runif(n, 0.5, 1.5),
                X2 = runif(n, 1.5, 4.5),
                X3 = runif(n, 4.5, 13.5))

# linear model : Y = X1^2 + X2 + X3
y <- with(X, X1^2 + X2 + X3)

# sensitivity analysis
x <- pcc(X, y, nboot = 100)
print(x)
plot(x)

library(ggplot2)
ggplot(x)
ggplot(x, ylim = c(-1.5,1.5))

x <- pcc(X, y, semi = TRUE, nboot = 100)
print(x)
plot(x)


sensitivity documentation built on Sept. 11, 2024, 9:09 p.m.