View source: R/assoc.twocont.R

assoc.twocont | R Documentation |

Measures the association between two continuous variables with Pearson, Spearman and Kendall correlations.

assoc.twocont(x,y,weights=rep(1,length(x)), nperm=NULL,distrib="asympt")

`x` |
a continuous variable (must be a numeric vector) |

`y` |
a continuous variable (must be a numeric vector) |

`weights` |
an optional numeric vector of weights (by default, a vector of 1 for uniform weights) |

`nperm` |
numeric. Number of permutations for the permutation test of independence. If NULL (default), no permutation test is performed. |

`distrib` |
the null distribution of permutation test of independence can be approximated by its asymptotic distribution ( |

A data frame with Pearson, Spearman and Kendall correlations. The correlation value is in the first row and a p-value from a permutation (so non parametric) test of independence is in the second row.

Nicolas Robette

`assoc.twocat`

, `assoc.catcont`

, `assoc.yx`

, `condesc`

,
`catdesc`

, `darma`

, `ggassoc_scatter`

## Hollander & Wolfe (1973), p. 187f. ## Assessment of tuna quality. We compare the Hunter L measure of ## lightness to the averages of consumer panel scores (recoded as ## integer values from 1 to 6 and averaged over 80 such values) in ## 9 lots of canned tuna. x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1) y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8) assoc.twocont(x,y,nperm=100)

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.