interaction_twofacaov: Pairwise Two-Way ANOVA Of Interaction (Treatment) Effects

View source: R/ANOVA.R

interaction_twofacaovR Documentation

Pairwise Two-Way ANOVA Of Interaction (Treatment) Effects

Description

The function performs a pairwise two-way ANOVA of interaction effects of Factor2 control to Factor2 treatment for every Factor1. The p-values are adjusted using Benjamini-Hochberg correction procedure. #' Caution: In the actual version it is necessary to provide a Label column(grouping variable 1 and 2 separated by label delimiter (label_delim)) in addition to grouping variable 1 and 2 necessary.

Usage

interaction_twofacaov(
  root_norm,
  col_grouping1 = "Factor1",
  col_grouping2 = "Factor2",
  col_value = "LengthMM",
  control = "20",
  label_delim = ";",
  draw_out = F,
  file_base = "2fac_ANOVA_BH_corrected",
  axis_label_size = 0.7,
  p_value_size = 0.8
)

Arguments

root_norm

data.frame; normalized Rootdetection data set

col_grouping1

string; column name of the first grouping variable (Factor1)

col_grouping2

string; column name of the second grouping variable (Factor2)

col_value

string; name of the column containing values (dependent variable) (LengthMM)

control

string; name of the grouping variable 2 (Factor2) control condition

label_delim

character; defines how Factor1 and Factor2 are separated in Label

draw_out

logical; If TRUE Matrix containing p-values is plotted in pdf file

file_base

string; file name of the pdf output (is needed if draw_out = T)

axis_label_size

numeric; font size of axis labels

p_value_size

numeric; font size of the p-values printed in pdf file

Value

list; matrices containing p-values for pairwise two way ANOVA (treatment effect)

Examples

# get data.frame containing p-values for pairwise two-way ANOVA of interaction effects

root_norm <- norm_10mm_standard(root_output)
interaction_twofacaov(root_norm, control = "20", label_delim = ";", draw_out = FALSE)

# get data.frame and plot as pdf output

root_norm <- norm_10mm_standard(root_output)
interaction_twofacaov(root_norm,
  control = "20", label_delim = ";",
  draw_out = TRUE, file_base = "2fac_ANOVA_BH_corrected"
)
# function creates a pdf file 2fac_ANOVA_BH_corrected_28.pdf

PhilippJanitza/rootdetectR documentation built on Feb. 24, 2024, 6:46 a.m.