Description Usage Arguments Details Value Author(s) Examples
View source: R/GroupClustering.R
posthocKW is used to group or cluster effects using the Kruskal-Wallis test for making a non-parametric based post-hoc analysis.
1 2 3 4 |
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
1 | print( posthocKW(DeIdentifiedExample$Y, DeIdentifiedExample$Treatment) )
|
Loading required package: igraph
Attaching package: ‘igraph’
The following objects are masked from ‘package:stats’:
decompose, spectrum
The following object is masked from ‘package:base’:
union
Loading required package: multcomp
Loading required package: mvtnorm
Loading required package: survival
Loading required package: TH.data
Loading required package: MASS
Attaching package: ‘TH.data’
The following object is masked from ‘package:MASS’:
geyser
Levels ParameterCI
1 A 10.0915(9.0298-11.3784)b
2 B 16.5603(15.3218-17.3622)e
3 C 13.4415(12.0728-15.6573)c
4 D 14.9718(13.4961-15.8313)cd
5 E 16.6604(14.9879-17.6149)de
6 F 8.6227(7.0804-9.6089)a
7 G 13.8177(11.5624-14.9892)c
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.