Generate a Table with P-values from two-way ANOVA with TurkeyHSD posthoc
gentab_P.2wayANOVA_posthocTurkeyHSD.Rd
Given a dataframe and a set of numerical variables of that dataframe, it performs 2-way ANOVA, with also TurkeyHSD posthoc tests for between groups comparison, to each desired variable and creates a new table with the p-values.
Usage
gentab_P.2wayANOVA_posthocTurkeyHSD(
DF,
v,
f,
interact = FALSE,
FDR = FALSE,
groupdiff = FALSE,
pcutoff = 0.05,
filter_sign = FALSE,
cutPval = FALSE
)
Arguments
- DF
a dataframe.
- v
a character vector. Each element must correspond to a column name of the df, each of which must contain numeric values. Moreover, missing values are not allowed (if any, consider before replacing them using the function transf_data of the present package).
- f
character vector of length 2. Name of the two columns of df containing the factor variables for performing the two-way ANOVA.
- interact
logical. Do you also want to perform interactions?
- FDR
logical. If TRUE, after performing the ANOVA, it also correct p-values across the different variables with a false discovery rate multiple comparison correction (method "fdr" of the function p.adjust).
- groupdiff
logical. Do you also what to add an additional column indicating which group is higher?
- pcutoff
a numeric of length 1, must be between 0 and 1. If groupdiff is TRUE, the difference between groups will be reported only if the p-values is below the cut-off reported here.
- filter_sign
logical. If TRUE, the table will be filtered and only the p-values lower than the value specified in pcutoff will be considered.
- cutPval
logical. If TRUE, it cut the p-values using the cutP function of the present package.