View source: R/assoc.catcont.R
assoc.catcont | R Documentation |
Measures the association between a categorical variable and a continuous variable
assoc.catcont(x,y,weights=rep(1,length(x)), nperm=NULL,distrib="asympt",digits=3)
x |
the categorical variable (must be a factor) |
y |
the 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 ( |
digits |
integer. The number of digits (default is 3). |
A list with the following elements :
eta.squared |
eta-squared between the two variables |
permutation.pvalue |
p-value from a permutation (so non-parametric) test of independence |
cor |
point biserial correlation between the two variables, for each level of the categorical variable |
cor.perm.pval |
permutation p-value of the correlation between the two variables, for each level of the categorical variable |
Nicolas Robette
Rakotomalala R., 'Comprendre la taille d'effet (effect size)', [http://eric.univ-lyon2.fr/~ricco/cours/slides/effect_size.pdf]
assoc.twocat
, assoc.twocont
, assoc.yx
, condesc
,
catdesc
, darma
, ggassoc_boxplot
## Annette Dobson (1990) "An Introduction to Generalized Linear Models". ## Page 9: Plant Weight Data. ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- gl(2, 10, 20, labels = c("Ctl","Trt")) weight <- c(ctl, trt) assoc.catcont(group,weight,nperm=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.