effectSize: Effect size calculation

Description Usage Arguments Value Examples

View source: R/homework.R

Description

Calculates the effect size (Cohen's d) for a variable with two groups.

Usage

1

Arguments

x

A numeric vector of a variable.

q

A corresponding logical vector (0 or 1) indicating whether each of the elements of vector x belongs to group 0 or 1.

Value

The effect size of the varible between the two groups.

Examples

1
2
3
x=c(runif(10,5,6),runif(10,7,8))
q=c(rep(0,10),rep(1,10))
effectSize(x,q)

loublanpain/BMI585FinalProjectLouBlanpain documentation built on Dec. 21, 2021, 11:49 a.m.