Mult_T_Tests: Function to Conduct Multiple T-Tests

Description Usage Arguments Value Author(s) See Also Examples

Description

This function takes a list created by either SubsetCleaner or DataCleaner and conducts multiple t-test comparissons between the fact levels.

Usage

1
2
Mult_T_Tests(data, groups = FALSE, paired = FALSE, test = "bonferroni", 
             alpha_value = 0.05, ...)

Arguments

data

Is a list output from either SubsetCleaner or DataCleaner

groups

Either TRUE or FALSE. If data came from SubsetCleaner then this value needs to be set to TRUE. If data came from DataCleaner then this value needs to be set to FALSE. The default is FALSE.

paired

Is an aurgement passed to t.test for whether the data being compared is paired or not. This defaults to FALSE.

test

Defaults to Bonferonni. Is passed to p.adjust to tell it what method to alter the p-value by. Look up appropriate methods to use here by looking at ?p.adjust().

alpha_value

Defaults to 0.05. This is the orignal p-value that will be manipulated based on the test aurgument.

...

Other arguments to be passed to t.test.

Value

Output_table

consisting of a table with the comparison, p-values, adjusted p-values, and whether the adjusted p-value is less than or equal to the alpha value

Summary_table

a table with the fact levels and associated average respo, sorted from highest to lowest

Author(s)

Selina A. Ruzi

See Also

SubsetCleaner DataCleaner t.test p.adjust data.table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## -- find path
mypath <- system.file("extdata", "Example_data.csv", package="multipleComparisons")

## -- read in data
Example_data <- read.csv(mypath, header=TRUE)
names(Example_data)

## -- If do not want to further subset the data, do the following
myCleanData <- DataCleaner(Example_data, fact="Plot", 
respo="Seed_removal_percent", 
warn=FALSE)

## -- No Subsetting Example
myDataTests <- Mult_T_Tests(myCleanData, groups=FALSE)


## -- Subsetting Example

myCleanSubset <- SubsetCleaner(Example_data, fact="Plot", respo="Seed_removal_percent", 
                               sub ="Season", warn=FALSE)

mySubsetTests <- Mult_T_Tests(myCleanSubset, groups=TRUE)

sruzi24/multiple_comparisons documentation built on May 15, 2019, 5:03 a.m.