GroupClusterEffects: Group effects for GLMs and GLMMs

Description Usage Arguments Details Value Author(s) Examples

View source: R/OldCompatibility.R

Description

GroupClusterEffects is an alias of the function posthoc, temporarily kept for compatibility.

Usage

1
2
3
4
5
6
7
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)

Arguments

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)

Details

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.

Value

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).

Author(s)

Rodrigo Labouriau

Examples

1
2
3
MM <- glm(Y ~ Treatment+0,  data=DeIdentifiedExample)
GG <- posthoc(MM)
print(GG)

Example output

Loading required package: igraph

Attaching package:igraphThe following objects are masked frompackage:stats:

    decompose, spectrum

The following object is masked frompackage: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.dataThe following object is masked frompackage:MASS:

    geyser

      Levels                 ParameterCI
1 TreatmentA     10.1546(8.903-11.4063)a
2 TreatmentB   16.2905(15.0389-17.5422)d
3 TreatmentC  13.5463(12.2946-14.7979)bc
4 TreatmentD 14.5171(13.2655-15.7688)bcd
5 TreatmentE  16.1834(14.9318-17.4351)cd
6 TreatmentF      8.6771(7.4255-9.9288)a
7 TreatmentG   13.5065(12.2549-14.7582)b

postHoc documentation built on July 1, 2020, 7:22 p.m.