correlation_with_size: Correlation with size

View source: R/functions_statistics.R

correlation_with_sizeR Documentation

Correlation with size

Description

This function computes the correlation between an attribute and the size of the groups.

Usage

correlation_with_size(partition, attribute, categorical)

Arguments

partition

A partition (vector)

attribute

A vector containing the values of the attribute

categorical

A Boolean (True or False) indicating if the attribute is categorical

Value

A number corresponding to the correlation coefficient if the attribute is numerical or the correlation ratio if the attribute is categorical.

Examples

p <- c(1,2,2,3,3,4,4,4,5)
at <- c(3,5,23,2,1,0,3,9,2)
correlation_with_size(p,at,categorical=FALSE)

ERPM documentation built on May 29, 2024, 10:05 a.m.