Description Usage Arguments Value Examples
t_testList performs paired and unpaired parametric and non-parametric t.tests between columns within a data.frame, for multiple pairs of varaibles given in list form.
1 2 | t_testList(data, list_of_t.tests, dec = 2, pdec = 3, var.equal = TRUE,
parametric = TRUE, paired = FALSE, NPDescriptives = F, NPtype = "IQR")
|
data |
data.frame containing all columns provided in 'list_of_t.tests' |
list_of_t.tests |
A list, in which each element contains the names of two variables from 'data' |
dec |
Number of decimals to round descriptive statistics to |
pdec |
Number of decimals to round p-values to |
var.equal |
If TRUE, and parametric==TRUE, student's t.test will be used, else Welch's t.test methods are used |
parametric |
If TRUE, t.test() methods are used, else wilcox.test() methods are used |
paired |
If TRUE, the two variables will be treated as paired. |
NPDescriptives |
If TRUE, Median and either IQR or range are provided, else Mean and Std are provided |
NPtype |
Can be 'IQR' or 'range'. If NPDescriptives==TRUE, then the specified variance estimate(s) will be provided |
A data.frame containing the results from the t.tests along with descriptive statistics.
1 2 3 4 5 6 7 8 9 10 11 | #example_df <- data.frame(x1 = rnorm(100),
# x2 = rnorm(100),
# x3 = rnorm(100),
# x4 = rnorm(100),
# x5 = rnorm(100))
#list <- list(c("x1", "x2"), c("x1", "x3"), c("x4", "x5"))
#t_testList(example_df, list)
#t_testList(example_df, list, parametric = F)
#t_testList(example_df, list, paired = T)
#t_testList(example_df, list, NPDescriptives = T)
#t_testList(example_df, list, NPDescriptives = T, NPtype = "range")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.