Description Usage Arguments Details Value Author(s) See Also Examples

Correlate is a function that cestimates correlation between two variables, which can be either continuous, categorical (ordered factor) or censored (survival data).

1 2 3 |

`X` |
Vector of type numeric, ordered factor, or Surv. |

`Y` |
Vector of type numeric, ordered factor, or Surv of same length as |

`method` |
One of the following values: pearson, spearman, kendall, frequency, cramersv, or cindex. |

`strata` |
Vector of type factor corresponding to the sample strata. |

`weights` |
Vector of type numeric corresponding to the sample weights. |

`outX` |
For cindex, if set to |

`bootstrap_count` |
If set to |

`alpha` |
The probability of Type I error that is, rejecting a null hypothesis when it is in fact true |

`alternative` |
a character string specifying the alternative hypothesis,must be one of two.sided (default), greater or less. You can specify just the initial letter. |

The `correlate`

function could be used to measure correlation between any types of variables:

- numeric vs. numeric
Pearson, Spearman, Kendall or concordance index

- numeric vs. ordered factor
concordance index (Somers' Dxy)

- numeric vs. survival data
concordance index (Somers' Dxy)

- ordered factor vs. ordered factor
Carmer's V

- ordered factor vs. survival data
concordance index (Somers' Dxy)

- survival data vs. survival data
concordance index (Somers' Dxy)

Part of the code underlying `correlate`

is also used in `mim`

method of the `mRMRe.Data`

object because correlations are used to build the mutual information matrix in order for feature selection to take place. This is why these two functions have many argiuments in common.

`estimate` |
point estimate |

`se` |
standard error |

`lower` |
lower confidence bound |

`upper` |
upper confidence bound |

`p` |
p-value |

`n` |
sample size |

Nicolas De Jay, Simon Papillon-Cavanagh, Benjamin Haibe-Kains

1 2 3 4 5 6 7 8 9 10 | ```
set.thread.count(2)
## load data
data(cgps)
## spearman correlation coefficent between the first gene and Camptothecin IC50
correlate(X=cgps.ge[ ,1], Y=cgps.ic50, method="spearman")
## concordance index between the first gene and Camptothecin IC50
correlate(X=cgps.ge[ ,1], Y=cgps.ic50, method="cindex")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.