es: function to calculate the effect size of a comparison

Description Usage Arguments Value Author(s) See Also Examples

View source: R/functions.R

Description

this function is a wrapper and an adapter around the functions 'stat.desc' and 'mes' it takes a data.frame with variables and calculate the effect size of a comparison between two chunks of variation, they could be two levels of one factor, the combined effect of more than one level of a factor vs another level or between two levels of a factor constrained to one level of another factor, what is called simple effects analysis, all this possible comparisons between two chunks can be analysed with the same function by using orthogonal contrasts coded inside the data.frame as columns of dummy variables with the weights representing the comparison worth to be analysed closer

Usage

1
es(data, dep, contrast, dig = 3)

Arguments

data

a character string without ” specifying a data.frame object with the data, each variable must be in only one column, one dummy variable with weights (in one column) for each contrast to be analysed must be provided

dep

a character string without ” specifying the name of the dependent variable, this must be at the same time a column name in the data object

contrast

a character string without ” specifying the name of the contrast to be analysed, this must be at the same time the name of a column for a dummy variable with weights specifying which samples should be compared

dig

numeric an integer specifying the number of decimal digits to be printed out and also invisibly returned by the mes() function

Value

the function returns invisibly a data.frame with all coefficients from the calculation of effect size, in addition it prints out a summary with the most important coefficients

Author(s)

gerardo esteban antonicelli

See Also

'check_contrasts' 'omega_factorial'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(gogglesDataES)
data(depressionDataES)
es(gogglesDataES, attractiveness, alcEffect1)
es(gogglesDataES, attractiveness, alcEffect2)
es(gogglesDataES, attractiveness, gender_none)
es(gogglesDataES, attractiveness, gender_twoPints)
es(gogglesDataES, attractiveness, gender_fourPints)
es(depressionDataES, diff, all_vs_NoTreatment, dig=4)
es(depressionDataES, diff, treatment_vs_placebo)
es(depressionDataES, diff, old_vs_newDrug, dig=2)
es(depressionDataES, diff, old_vs_oldDrug)

geantonicelli/GLM documentation built on Dec. 15, 2020, 3:05 p.m.