Title: | Tools for Post-Hoc Analysis |
---|---|
Description: | Implements a range of facilities for post-hoc analysis and summarizing linear models, generalized linear models and generalized linear mixed models, including grouping and clustering via pairwise comparisons using graph representations and efficient algorithms for finding maximal cliques of a graph. Includes also non-parametric toos for post-hoc analysis. It has S3 methods for printing summarizing, and producing plots, line and barplots suitable for post-hoc analyses. |
Authors: | Rodrigo Labouriau [aut, cre]
|
Maintainer: | Rodrigo Labouriau <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.3 |
Built: | 2025-02-27 03:16:42 UTC |
Source: | https://github.com/cran/postHoc |
Constructs a matrix with all the contrasts for pairwise comparisons.
AllContrasts(n)
AllContrasts(n)
n |
an integer number larger than 1 giving the number of contrasts defining the pairwise comparisons pairwise comparisons. |
This is an auxiliar function forming a contrast matrix of all possible. Generates an error if n is smaller than 2.
a matrix of dimension n(n-1)/2 x n.
Rodrigo Labouriau
AllContrasts(3)
AllContrasts(3)
Wald approximation for the p-values of pairwise comparisons based on the design matrix
ApproxWaldPvalues(Effects, CovMatrix, DesignMatrix, padjust = "fdr")
ApproxWaldPvalues(Effects, CovMatrix, DesignMatrix, padjust = "fdr")
Effects |
a vector containing the effects |
CovMatrix |
the covariance matrix of the effects |
DesignMatrix |
design matrix |
padjust |
method for correcting for multiple testing as in the function p.adjust (default = "fdr", if NULL no adjustments is made) |
a vector of p-values.
Rodrigo Labouriau
Barplot method for objects of class PostHoc
## S3 method for class 'PostHoc' barplot( height, col = "lightblue", labelsCol = "black", space2max = 0, UseGrouping = TRUE, ylim = NULL, main = "", ylab = "", xlab = "", lty = 1, drawAxis = TRUE, rightshift = 0, additionalTextGrouping = "", superpose = FALSE, cex.grouping = 1, cex.ticks = 0.1, cex.lab = 1, ylog = FALSE, ... )
## S3 method for class 'PostHoc' barplot( height, col = "lightblue", labelsCol = "black", space2max = 0, UseGrouping = TRUE, ylim = NULL, main = "", ylab = "", xlab = "", lty = 1, drawAxis = TRUE, rightshift = 0, additionalTextGrouping = "", superpose = FALSE, cex.grouping = 1, cex.ticks = 0.1, cex.lab = 1, ylog = FALSE, ... )
height |
an object of class PostHoc to be printed |
col |
the colour of the bars (default = "lightblue") |
labelsCol |
the colour of the bars (default = "black") |
space2max |
space between the upper limit of the confidence interval and the label¨ |
UseGrouping |
should the grouping be added to the plots (default = TRUE) |
ylim |
range of the vertical axis |
main |
character with the title of the plot (default = ”) |
ylab |
label of the vertical axis |
xlab |
label of the horizontal axis |
lty |
type of line |
drawAxis |
should the axis be drawn (default = TRUE) |
rightshift |
a number specifying a (small) right shift of the line |
additionalTextGrouping |
character vector with additional text to the grouping |
superpose |
should the graph be superposed to an existing graph (default = FALSE) |
cex.grouping |
size of the labels of groups |
cex.ticks |
size of the thicks defining the the limits of the confidence intervals |
cex.lab |
size of the labels |
ylog |
should the vertical axis be expressed in a logarithmic scale (default = FALSE) |
... |
parameters to be passed to the barlot function |
none
Rodrigo Labouriau
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) GG <- posthoc(MM) barplot(GG)
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) GG <- posthoc(MM) barplot(GG)
A simple example of data for testing pairwise comparison methods composed of a normally distributed response and a factor with 7 levels.
data("DeIdentifiedExample")
data("DeIdentifiedExample")
A data frame with 70 observations on the following 2 variables.
Y
a numeric vector containing a response variable
Treatment
a factor with 7 levels A
B
C
D
E
F
G
De identified real dataset for testing
A real data set with altered names, so that the source (irrelevant in this context) cannot be identified.
data(DeIdentifiedExample) str(DeIdentifiedExample)
data(DeIdentifiedExample) str(DeIdentifiedExample)
posthoc is used to group or cluster the effects of liner, generalised linear and generalised linear mixed models according to significance of pairwise tests comparing the levels of the effects.
ExtractCI (Model, EffectIndices = NULL, EffectLabels = NULL, ParBootstrap = FALSE, Nboots = 999, digits = 4, coverage = 0.95, UpperBound = Inf, SignificanceLevel = 1-coverage, EffectsMatrix = NULL, Scale = 1.0, Location = 0.0, isBinomialModel = FALSE, BackTransform = TRUE)
ExtractCI (Model, EffectIndices = NULL, EffectLabels = NULL, ParBootstrap = FALSE, Nboots = 999, digits = 4, coverage = 0.95, UpperBound = Inf, SignificanceLevel = 1-coverage, EffectsMatrix = NULL, Scale = 1.0, Location = 0.0, isBinomialModel = FALSE, BackTransform = TRUE)
Model |
a model of class lm, glm, glmerMod, lme or gls. |
EffectIndices |
a vector containing the indices of the effects to be analysed (default = NULL, indicating that all the levels are used). |
EffectLabels |
a character vector with the labels of the effects (default = NULL, which implies that the corresponding labels of the model coefficient are used). |
ParBootstrap |
logic flag indicating whether the confidence intervals should be calculated with parametric bootstrap (default is false, i.e. the Wald confidence interval is used). |
Nboots |
number of bootstrap samples used for the confidence interval. (default = 999). |
digits |
number of digits used when reporting the results |
coverage |
the coverage of the confidence intervals (default = 0.95) |
UpperBound |
an upper bound to the confidence intervals (default = Inf) |
SignificanceLevel |
the significance level of the pairwise comparisons (default = 0.05). |
EffectsMatrix |
matrix defining contrasts to be compared (bypasses the EffectIndices, default is NULL, meaning that standard inference is performed). |
Scale |
a scaling factor multiplying the output table (default = 1, i.e., no scaling is used). |
Location |
a location term added to the output table (default = 0, i.e., no location shift is performed). |
isBinomialModel |
a logical flag indicating whther the model is a binomial model different than the Bernoulli (default = FALSE, i.e. not a binomial model). |
BackTransform |
should the parameters and CIs be back transformed by applying the inverse link function (default = TRUE) |
Two possible methos for obtaining confidence intervals are available: Wald confidence intervals and parametric bootstrap confidence intervals.
an object of (S3) class "PostHoc".
a matrix with three columns containing the effects, the lower bound and the upper bound of the confidence intervals for the effects.
Rodrigo Labouriau
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) ExtractCI (MM)
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) ExtractCI (MM)
Group effects given the pairwise p-values
FormGroupsClusters( PvaluesMatrix, CI = NULL, Effects, SignificanceLevel = 0.05, UpperCase = FALSE, RankLabels = TRUE, PlotAdj = FALSE, padjust = NULL, CalcClusters = FALSE, digits = 4 )
FormGroupsClusters( PvaluesMatrix, CI = NULL, Effects, SignificanceLevel = 0.05, UpperCase = FALSE, RankLabels = TRUE, PlotAdj = FALSE, padjust = NULL, CalcClusters = FALSE, digits = 4 )
PvaluesMatrix |
a matrix containing the p-values of the comparisons of each possible pairs of effects in the lower triangle (excluding the diagonal) |
CI |
a matrix containing with three columns containint the effects, the lower limits and the upper limits of a confidence interval for the effects (default = NULL, indicating that no confidence intervals are available) |
Effects |
a vector containing the effects |
SignificanceLevel |
the significance level of the pairwise comparisons (default = 0.05) |
UpperCase |
should upper case letters be used for labelling the groups (default is FALSE) |
RankLabels |
should the labels of the grouping be sorted according to the value of the response (default=TRUE) |
PlotAdj |
should the associated graph be printed(default = FALSE) |
padjust |
method for correcting the p-values (before the calculations are performed) as in the function p.adjust (Default is NULL, indicating that no multiple testing corrections are used) |
CalcClusters |
should the clusters be calculated and displayed instead of grouping (Default is FALSE) |
digits |
number of digits in the output (default = 4) |
This is an auxiliar function forming a contrast matrix of all possible. Generates an error if n is smaller than 2. The function contructs, using the supplied matrix of p-values for all pairwise comparisosns, an undirected graph with vertices representing the levels of the effects, using the convention that two vertices are connected by an edge iff the p-value for testing equality the two vertices is larger than the prefixed significance level. The maximal cliques of this graph form the grouping of the levels of the effects.
an object of (S3) class "PostHoc" with methods for print, summary, plot, barplot and lines defined. An object of class "PostHoc" contails the effects, grouping, the matrix of p-values of all pairwise comparisons, the graph (Gr) of adjacency, the confidence intervals of the effects, the significance levels, the number of digits to be used for printing, the list of maximal cliques of the graph Gr, the clusters (if calculated).
Rodrigo Labouriau
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) GG <- posthoc(MM) Effects <- coef(MM) PvaluesMatrix <- GG$PvaluesMatrix TT <- FormGroupsClusters(PvaluesMatrix = PvaluesMatrix, Effects = Effects) plot(TT)
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) GG <- posthoc(MM) Effects <- coef(MM) PvaluesMatrix <- GG$PvaluesMatrix TT <- FormGroupsClusters(PvaluesMatrix = PvaluesMatrix, Effects = Effects) plot(TT)
GroupClusterEffects is an alias of the function posthoc, temporarily kept for compatibility.
GroupClusterEffects (Model, EffectIndices = NULL, EffectLabels = NULL, EffectsMatrix = NULL, ParBootstrap = FALSE, Nboots = 999, SignificanceLevel = 0.05, UpperCase = FALSE, RankLabels = TRUE, WaldApproximation = FALSE, CalcClusters = FALSE, QUIET = TRUE, PlotAdj = FALSE, digits = 4, padjust = NULL, Scale = 1.0, Location = 0.0, isBinomialModel = FALSE, BackTransform = TRUE)
GroupClusterEffects (Model, EffectIndices = NULL, EffectLabels = NULL, EffectsMatrix = NULL, ParBootstrap = FALSE, Nboots = 999, SignificanceLevel = 0.05, UpperCase = FALSE, RankLabels = TRUE, WaldApproximation = FALSE, CalcClusters = FALSE, QUIET = TRUE, PlotAdj = FALSE, digits = 4, padjust = NULL, Scale = 1.0, Location = 0.0, isBinomialModel = FALSE, BackTransform = TRUE)
Model |
a model of class lm, glm, glmerMod, lme or gls. |
EffectIndices |
a vector containing the indices of the effects to be analysed (default = NULL, indicating that all the levels are used). |
EffectLabels |
a character vector with the labels of the effects (default = NULL, which implies that the corresponding labels of the model coefficient are used). |
EffectsMatrix |
matrix defining contrasts to be compared (bypasses the EffectIndices, default is NULL, meaning that standard inference is performed). |
ParBootstrap |
logic flag indicating whether the confidence intervals should be calculated with parametric bootstrap (default is false, i.e. the Wald confidence interval is used). Not implemented for objects of class lme. |
Nboots |
number of bootstrap samples used for the confidence interval. (default = 999). |
SignificanceLevel |
the significance level of the pairwise comparisons (default = 0.05). |
UpperCase |
should upper case letters be used for labelling the groups (default is FALSE). |
RankLabels |
should the labels of the grouping be sorted according to the value of the response (default=TRUE) |
WaldApproximation |
logic flag indicating whether a Wald approximated test should be used (defaut = FALSE). |
CalcClusters |
should the clusters be calculated and displayed instead of grouping (Default is FALSE) |
QUIET |
flag indicating whter the (large) output of the multcomp library should be temporarily re-directed (default = TRUE). |
PlotAdj |
should the associated graph be printed(default = FALSE). |
digits |
number of digits in the output (default = 4) |
padjust |
method for correcting the p-values (before the calculations are performed) as in the function p.adjust (Default is NULL, indicating that no multiple testing corrections are used) |
Scale |
a scaling factor multiplying the output table (default = 1, i.e., no scaling is used). |
Location |
a location term added to the output table (default = 0, i.e., no location shift is performed). |
isBinomialModel |
a logical flag indicating whther the model is a binomial model different than the Bernoulli (default = FALSE, i.e. not a binomial model). |
BackTransform |
should the effects and CIs be back transformed by applying the inverse link function (default = TRUE) |
The function contructs, using the supplied matrix of p-values for all pairwise comparisosns, an undirected graph with vertices representing the levels of the effects, using the convention that two vertices are connected by an edge iff the p-value for testing equality the two vertices is larger than the prefixed significance level. The maximal cliques of this graph form the grouping of the levels of the effects. The parameter BackTransform, indicating whether the effects and CIs should be beck transformed using the inverse of the link function is incorporated in this version, but was not present in the original function GroupClusterEffects. Since the default of the parameter BackTransform is TRUE any conflict with the old function GroupClusterEffect is generated, but the new facility is implemented.
Perform post hoc analyses via pairwise comparisons of all the effect levels, or of a supplied subset of effects (using the parameter "EffectIndices") or even linear combinations of effects (using the parameter "EffectsMatrix"). Uses the syntax of the function posthoc, which differs slightly from the original syntaxis of GroupClusterEffects.
an object of (S3) class "PostHoc" with methods for print, summary, plot, barplot and lines defined. An object of class "PostHoc" contails the effects, grouping, the matrix of p-values of all pairwise comparisons, the graph (Gr) of adjacency, the confidence intervals of the effects, the significance levels, the number of digits to be used for printing, the list of maximal cliques of the graph Gr, the clusters (if calculated).
Rodrigo Labouriau
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) GG <- posthoc(MM) print(GG)
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) GG <- posthoc(MM) print(GG)
Calculates all p-values of pairwise comparisons using a Kruskal-Wallis test
KruskalWallisAllPvalues(y, g, padjust = "fdr")
KruskalWallisAllPvalues(y, g, padjust = "fdr")
y |
is a vector with the response |
g |
is a single classification factor |
padjust |
the method for adjusting for multiple comparisons following the convention of the functions stats::p. adjust(default = "fdr"), NULL or "none" does not adjust |
a vector with the p-values for comparing all the possible pairs.
Rodrigo Labouriau
KruskalWallisAllPvalues(y = DeIdentifiedExample$Y, g = DeIdentifiedExample$Treatment)
KruskalWallisAllPvalues(y = DeIdentifiedExample$Y, g = DeIdentifiedExample$Treatment)
Lines method for objects of class PostHoc
## S3 method for class 'PostHoc' lines( x, col = "black", labelsCol = "black", space2max = 0, UseGrouping = TRUE, ylim = NULL, main = "", ylab = "", xlab = "", lty = 1, drawAxis = TRUE, rightshift = 0, additionalTextGrouping = "", superpose = FALSE, cex.grouping = 1, cex.ticks = 0.1, cex.lab = 1, ylog = FALSE, ... )
## S3 method for class 'PostHoc' lines( x, col = "black", labelsCol = "black", space2max = 0, UseGrouping = TRUE, ylim = NULL, main = "", ylab = "", xlab = "", lty = 1, drawAxis = TRUE, rightshift = 0, additionalTextGrouping = "", superpose = FALSE, cex.grouping = 1, cex.ticks = 0.1, cex.lab = 1, ylog = FALSE, ... )
x |
an object of class PostHoc to be printed |
col |
the colour of the lines (default = "black") |
labelsCol |
the colour of the bars (default = "black") |
space2max |
space between the upper limit of the confidence interval and the label¨ |
UseGrouping |
should the grouping be added to the plots (default = TRUE) |
ylim |
range of the vertical axis |
main |
character with the title of the plot (default = ”) |
ylab |
label of the vertical axis |
xlab |
label of the horizontal axis |
lty |
type of line |
drawAxis |
should the axis be drawn (default = TRUE) |
rightshift |
a number specifying a (small) right shift of the line |
additionalTextGrouping |
character vector with additional text to the grouping |
superpose |
should the graph be superposed to an existing graph (default = FALSE) |
cex.grouping |
size of the labels of groups |
cex.ticks |
size of the thicks defining the the limits of the confidence intervals |
cex.lab |
size of the labels |
ylog |
should the vertical axis be expressed in a logarithmic scale (default = FALSE) |
... |
parameters to be passed to the function lines |
none
Rodrigo Labouriau
MM <- glm(Y ~ Treatment+0, data = DeIdentifiedExample) GG <- posthoc(MM) lines(GG)
MM <- glm(Y ~ Treatment+0, data = DeIdentifiedExample) GG <- posthoc(MM) lines(GG)
Confidence intervals for medians
MedianBootCI(y, g, Nboots = 9999, Coverage = 0.95, digits = 4)
MedianBootCI(y, g, Nboots = 9999, Coverage = 0.95, digits = 4)
y |
is a vector with the response. |
g |
is a single classification factor. |
Nboots |
number of bootstrap samples (default = 9999). |
Coverage |
the coverage probability of the confidence interval. |
digits |
the number of digits (devfault = 4) (default = 0.95) "none" does not adjust |
a matrix with three columns, the median, the lower bound and the upper bound of the confidence interval and one row for each level of g.
Rodrigo Labouriau
MedianBootCI (y = DeIdentifiedExample$Y, g = DeIdentifiedExample$Treatment)
MedianBootCI (y = DeIdentifiedExample$Y, g = DeIdentifiedExample$Treatment)
Plot method for objects of class PostHoc
## S3 method for class 'PostHoc' plot(x, y, ...)
## S3 method for class 'PostHoc' plot(x, y, ...)
x |
an object of class PostHoc to be printed. |
y |
an object of class PostHoc to be printed. |
... |
further arguments passed to or from other methods. |
none
Rodrigo Labouriau
MM <- glm(Y ~ Treatment + 0, data = DeIdentifiedExample) GG <- posthoc(MM) plot(GG)
MM <- glm(Y ~ Treatment + 0, data = DeIdentifiedExample) GG <- posthoc(MM) plot(GG)
posthoc is used to group or cluster the effects of liner, generalised linear and generalised linear mixed models according to significance of pairwise tests comparing the levels of the effects.
posthoc (Model, EffectIndices = NULL, EffectLabels = NULL, EffectsMatrix = NULL, ParBootstrap = FALSE, Nboots = 999, SignificanceLevel = 0.05, UpperCase = FALSE, RankLabels = TRUE, WaldApproximation = FALSE, CalcClusters = FALSE, QUIET = TRUE, PlotAdj = FALSE, digits = 4, padjust = NULL, Scale = 1.0, Location = 0.0, isBinomialModel = FALSE, BackTransform = TRUE)
posthoc (Model, EffectIndices = NULL, EffectLabels = NULL, EffectsMatrix = NULL, ParBootstrap = FALSE, Nboots = 999, SignificanceLevel = 0.05, UpperCase = FALSE, RankLabels = TRUE, WaldApproximation = FALSE, CalcClusters = FALSE, QUIET = TRUE, PlotAdj = FALSE, digits = 4, padjust = NULL, Scale = 1.0, Location = 0.0, isBinomialModel = FALSE, BackTransform = TRUE)
Model |
a model of class lm, glm, glmerMod, lme or gls. |
EffectIndices |
a vector containing the indices of the effects to be analysed (default = NULL, indicating that all the levels are used). |
EffectLabels |
a character vector with the labels of the effects (default = NULL, which implies that the corresponding labels of the model coefficient are used). |
EffectsMatrix |
matrix defining contrasts to be compared (bypasses the EffectIndices, default is NULL, meaning that standard inference is performed). |
ParBootstrap |
logic flag indicating whether the confidence intervals should be calculated with parametric bootstrap (default is false, i.e. the Wald confidence interval is used). Not implemented for objects of class lme. |
Nboots |
number of bootstrap samples used for the confidence interval. (default = 999). |
SignificanceLevel |
the significance level of the pairwise comparisons (default = 0.05). |
UpperCase |
should upper case letters be used for labelling the groups (default is FALSE). |
RankLabels |
should the labels of the grouping be sorted according to the value of the response (default=TRUE) |
WaldApproximation |
logic flag indicating whether a Wald approximated test should be used (defaut = FALSE). |
CalcClusters |
should the clusters be calculated and displayed instead of grouping (Default is FALSE) |
QUIET |
flag indicating whter the (large) output of the multcomp library should be temporarily re-directed (default = TRUE). |
PlotAdj |
should the associated graph be printed(default = FALSE). |
digits |
number of digits in the output (default = 4) |
padjust |
method for correcting the p-values (before the calculations are performed) as in the function p.adjust (Default is NULL, indicating that no multiple testing corrections are used) |
Scale |
a scaling factor multiplying the output table (default = 1, i.e., no scaling is used). |
Location |
a location term added to the output table (default = 0, i.e., no location shift is performed). |
isBinomialModel |
a logical flag indicating whther the model is a binomial model different than the Bernoulli (default = FALSE, i.e. not a binomial model). |
BackTransform |
should the parameters and CIs be back transformed by applying the inverse link function (default = TRUE) |
The function contructs, using the supplied matrix of p-values for all pairwise comparisosns, an undirected graph with vertices representing the levels of the effects, using the convention that two vertices are connected by an edge iff the p-value for testing equality the two vertices is larger than the prefixed significance level. The maximal cliques of this graph form the grouping of the levels of the effects.
Perform post hoc analyses via pairwise comparisons of all the effect levels, or of a supplied subset of effects (using the parameter "EffectIndices") or even linear combinations of effects (using the parameter "EffectsMatrix")
an object of (S3) class "PostHoc" with methods for print, summary, plot, barplot and lines defined. An object of class "PostHoc" contails the effects, grouping, the matrix of p-values of all pairwise comparisons, the graph (Gr) of adjacency, the confidence intervals of the effects, the significance levels, the number of digits to be used for printing, the list of maximal cliques of the graph Gr, the clusters (if calculated).
Rodrigo Labouriau
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) GG <- posthoc(MM) print(GG)
MM <- glm(Y ~ Treatment+0, data=DeIdentifiedExample) GG <- posthoc(MM) print(GG)
posthocKW is used to group or cluster effects using the Kruskal-Wallis test for making a non-parametric based post-hoc analysis.
posthocKW (y, g, EffectIndices = NULL, EffectLabels = NULL, Nboots = 9999, SignificanceLevel = 0.05, UpperCase = FALSE, RankLabels = TRUE, CalcClusters = FALSE, PlotAdj = FALSE, digits = 4, padjust = NULL, Scale = 1.0, Location = 0.0)
posthocKW (y, g, EffectIndices = NULL, EffectLabels = NULL, Nboots = 9999, SignificanceLevel = 0.05, UpperCase = FALSE, RankLabels = TRUE, CalcClusters = FALSE, PlotAdj = FALSE, digits = 4, padjust = NULL, Scale = 1.0, Location = 0.0)
y |
is a vector with the response. |
g |
is a single classification factor. |
EffectIndices |
a vector containing the indices of the effects to be analysed (default = NULL, indicating that all the levels are used). |
EffectLabels |
a character vector with the labels of the effects (default = NULL, which implies that the corresponding labels of the model coefficient are used). |
Nboots |
number of bootstrap samples used for the confidence interval. (default = 9999). |
SignificanceLevel |
the significance level of the pairwise comparisons (default = 0.05). |
UpperCase |
should upper case letters be used for labelling the groups (default is FALSE). |
RankLabels |
should the labels of the grouping be sorted according to the value of the response (default=TRUE) |
CalcClusters |
should the clusters be calculated and displayed instead of grouping (Default is FALSE) |
PlotAdj |
should the associated graph be printed(default = FALSE). |
digits |
number of digits in the output (default = 4) |
padjust |
method for correcting the p-values (before the calculations are performed) as in the function p.adjust (Default is NULL, indicating that no multiple testing corrections are used) |
Scale |
a scaling factor multiplying the output table (default = 1, i.e., no scaling is used). |
Location |
a location term added to the output table (default = 0, i.e., no location shift is performed). |
The function contructs, using Kruskal-Wallis rank sum tests all pairwise comparisosns, an undirected graph with vertices representing the levels of the effects, using the convention that two vertices are connected by an edge iff the p-value for testing equality the two vertices is larger than the prefixed significance level. The maximal cliques of this graph form the grouping of the levels of the effects.
an object of (S3) class "PostHoc" with methods for print, summary, plot, barplot and lines defined. An object of class "PostHoc" contails the effects, grouping, the matrix of p-values of all pairwise comparisons, the graph (Gr) of adjacency, the confidence intervals of the effects, the significance levels, the number of digits to be used for printing, the list of maximal cliques of the graph Gr, the clusters (if calculated).
Rodrigo Labouriau
print( posthocKW(DeIdentifiedExample$Y, DeIdentifiedExample$Treatment) )
print( posthocKW(DeIdentifiedExample$Y, DeIdentifiedExample$Treatment) )
Print methods for objects of class PostHoc
## S3 method for class 'PostHoc' print(x, digits = 4, ...)
## S3 method for class 'PostHoc' print(x, digits = 4, ...)
x |
an object of class PostHoc to be printed |
digits |
number of digits in the output (default = 4) |
... |
further arguments passed to or from other methods. |
a dataframe with two variables, Levels a factor containing the levels of the effects and ParaeterCI which is a factor with the effects and the corresponding confidence intervals and the grouping combined in a character constructed in such a way that when printing this dataframe yields a table arranged in a suitable format.
Rodrigo Labouriau
MM <- glm(Y ~ Treatment + 0, data = DeIdentifiedExample) GG <- posthoc(MM) print(GG)
MM <- glm(Y ~ Treatment + 0, data = DeIdentifiedExample) GG <- posthoc(MM) print(GG)
Summary method for objects of class PostHoc
## S3 method for class 'PostHoc' summary(object, ...)
## S3 method for class 'PostHoc' summary(object, ...)
object |
an object of class PostHoc to be printed. |
... |
further arguments passed to or from other methods. |
a dataframe constructed in such a way that when printing this dataframe yields a table arranged in a suitable format. The summary, differently than the print method displays also the matrix of p-values of all the pairwise comparisons.
Rodrigo Labouriau
MM <- glm(Y ~ Treatment + 0, data = DeIdentifiedExample) GG <- posthoc(MM) summary(GG)
MM <- glm(Y ~ Treatment + 0, data = DeIdentifiedExample) GG <- posthoc(MM) summary(GG)
Calculates a Wald approximation for the p-values of pairwise comparisons
WaldPvalues(Effects, CovMatrix, padjust = "fdr")
WaldPvalues(Effects, CovMatrix, padjust = "fdr")
Effects |
a vector containing the effects |
CovMatrix |
the covariance matrix of the effects |
padjust |
method for correcting for multiple testing as in the function p.adjust (default = "fdr", if NULL no adjustments is made) |
a vector of p-values.
Rodrigo Labouriau