prop_fav: A function to compute the proportion of 'favorable' pairwise...

View source: R/NAME_prop_fav.R

prop_favR Documentation

A function to compute the proportion of 'favorable' pairwise comparisons

Description

This function takes two vectors (x,y; ie., group 1 and 2) of values and computes all pairwise comparisons (>, ie., "greater than"). The proportion of x>y is returned. Columns must be quoted.

Usage

prop_fav(df, value, group, g1, g2)

Arguments

df

data frame

value

bare (unquoted) column with values of the two vectors

group

bare (unquoted) column with grouping information

g1

name of group 1 (quoted if not numeric)

g2

name of group 2 (quoted if not numeric)

Value

proportion of x>y

Examples

prop_fav(df = mtcars, value = hp, group = cyl, g1 = 6, g2 = 4)
data(extra, package = "prada")
prop_fav(df = extra, value = extra_mean, group = sex, g1 = "Frau", g2 = "Mann")

sebastiansauer/prada documentation built on Jan. 17, 2024, 11:05 a.m.