View source: R/multcompTools.R
pairComp | R Documentation |
This function provides pairwise comparisons between the element of a vector, as long as a vector of standard errors is provided
pairComp(parm, SE, nams = NULL, dfr = NULL, adjust = "none", level = 0.05, Letters = c(letters, LETTERS, "."), decreasing = FALSE)
parm |
A (possibly named) vector of estimates |
SE |
A vector of standard errors for the estimates in 'parm' |
nams |
A character vector of parameter names (optional). If it is not provided and if 'parm' is not a named vectors, numbers '1:length(parm)' are used. |
dfr |
An optional number of residual degrees of freedom (defaults to Inf) |
adjust |
A multiplicity adjustment method as in 'multcomp'. Defaults to "none". |
level |
Protection level for compact letter display |
Letters |
Vector of distinct characters (or character strings) used to connect levels that are not significantly different. They should be recogizable when concatenated. The default behaviour is to use the small letters, followed by the capital letters. See help for 'multcompView::multcompLetters()' for futher detail) |
decreasing |
logical. Should the order of means/letters be decreasing? Defaults to FALSE, which means that the means and letters are in increasing order ) |
Returns a list with the following elements
pairs |
A dataframe of pairwise comparisons |
Letters |
a dataframe with compact letter display |
Andrea Onofri
Onofri A. (2020) The broken bridge between biologists and statisticians: a blog and R package, Statforbiology, IT, web: https://www.statforbiology.com
# library(devtools) # install_github("OnofriAndreaPG/aomisc") library(aomisc) data(metamitron) #Fit nls grouped model modNlin <- nls(Conc ~ A[Herbicide] * exp(-k[Herbicide] * Time), start=list(A=rep(100, 4), k=rep(0.06, 4)), data=metamitron) summary(modNlin) # Retreive infos tab <- summary(modNlin) dRates <- tab$coef[5:8,1] SEs <- tab$coef[5:8,2] dfr = tab$df[2] cp <- pairComp(dRates, SEs, dfr = dfr, adjust = "holm") cp$pairs cp$Letters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.