cpm {cpmr} | R Documentation |
Perform Connectome-based Predictive Modeling (CPM)
Description
The connectome-based predictive modeling (CPM) is a data-driven approach to predict individual behavior from brain connectivity data. Originally proposed by Shen et al. (2017), the CPM has been widely used in various studies. This function implements the CPM algorithm and provides a convenient interface to use it.
Usage
cpm(
conmat,
behav,
...,
confounds = NULL,
thresh_method = c("alpha", "sparsity"),
thresh_level = 0.01,
kfolds = NULL,
bias_correct = TRUE,
return_edges = c("none", "sum", "all")
)
Arguments
conmat |
A matrix of connectome data. Observations in row, edges in column (assumed that duplicated edges are removed). |
behav |
A numeric vector contains behavior data. Length must equal to
number of observations in |
... |
For future extension. Currently ignored. |
confounds |
A matrix of confounding variables. Observations in row,
variables in column. If |
thresh_method , thresh_level |
The threshold method and level used in edge
selection. If method is set to be |
kfolds |
Folds number of cross-validation. If |
bias_correct |
Logical value indicating if the connectome data should be
bias-corrected. If |
return_edges |
A character string indicating the return value of the
selected edges. If |
Value
A list with the following components:
folds |
The corresponding fold for each observation when used as test group in cross-validation. |
real |
The real behavior data. This is the same as the input |
pred |
The predicted behavior data, with each column corresponding to
a model, i.e., both edges, positive edges, negative edges, and the row
names corresponding to the observation names (the same as those of
|
edges |
The selected edges, if |
References
Shen, X., Finn, E. S., Scheinost, D., Rosenberg, M. D., Chun, M. M., Papademetris, X., & Constable, R. T. (2017). Using connectome-based predictive modeling to predict individual behavior from brain connectivity. Nature Protocols, 12(3), 506–518. https://doi.org/10.1038/nprot.2016.178
Rapuano, K. M., Rosenberg, M. D., Maza, M. T., Dennis, N. J., Dorji, M., Greene, A. S., Horien, C., Scheinost, D., Todd Constable, R., & Casey, B. J. (2020). Behavioral and brain signatures of substance use vulnerability in childhood. Developmental Cognitive Neuroscience, 46, 100878. https://doi.org/10.1016/j.dcn.2020.100878
Examples
conmat <- matrix(rnorm(100 * 100), nrow = 100)
behav <- rnorm(100)
cpm(conmat, behav)
# use different threshold method and level
cpm(conmat, behav, thresh_method = "sparsity", thresh_level = 0.05)
# use a 10-fold cross-validation
cpm(conmat, behav, kfolds = 10)