SimLongi: Simultaneous Inference for Longitudinal Data

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Simultaneous inference for a set of contrasts (linear combinations) of means in longitudinal scenarios. Computes multiplicity-adjusted p-values and simultaneous confidence intervals for comparing groups at multiple time points, or comparing time points in multiple groups, or both.

Usage

1
2
3
4
SimLongi(data, response, group, time, id, covariates=NULL,
         var=list("hom", "het", "hett"), cor=list("CS", "AR1", "UN"),
         contrasts=NULL, type="Dunnett", base=1, direction="gpt",
         alternative="two.sided", level=0.95, df="ess")

Arguments

data

A data frame.

response

A character string giving the name of the response variable in data.

group

A character string giving the name of the (treatment) group variable in data.

time

A character string giving the name of the time variable in data.

id

A character string giving the name of the subject variable in data.

covariates

ccc

var

A list of character strings itemizing the patterns of heteroscedasticity to be included in model selection. The alternatives are hom (equal variances across groups and time points), het (different variances for all groups and time points), hett (variances equal across groups but different for time points), and hetg (variances equal across time points but different for groups).

cor

A list of character strings itemizing the correlation structures to be included in model selection. The alternatives are CS (compound symmetry), AR1 (first-order autoregressive), CAR1 (continuous first-order autoregressive), AR2 (second-order autoregressive), MA1 (first-order moving average), MA2 (second-order moving average), ARMA11 (first-order autoregressive moving average), and UN (unstructured).

contrasts

. Default to NULL. See examples.

type

A character string defining the type of contrast matrix (i.e., the set of comparisons); ignored unless contrasts=NULL. Two widespread and often useful choices are Dunnett (many-to-one i.e., compare each group against a common reference) and Tukey (all-pairs i.e., pairwise comparisons of all groups). Further options are Sequen, AVE, Changepoint, Williams, Marcus, McDermott, UmbrellaWilliams, and GrandMean. For direction="both" a vector of two character strings may be inserted: the first one specifies the gpt comparisons and the second one the tpg comparisons. If only a single character string is inserted when direction="both", this set of contrasts is applied to gpt and tpg comparisons.

base

An integer specifying the reference group with many-to-one comparisons; ignored unless contrasts=NULL and type="Dunnett". For direction="both" and type="Dunnett" for both gpt and tpg comparisons, a vector of two integers may be inserted to define reference groups for both factors (group and time). See examples.

direction

Defines which factor's levels are to be compared at each level of the other factor; ignored unless contrasts=NULL. gpt ("groups per time") invokes comparisons among groups separately and simultaneously for each time point. By contrast, tpg ("times per group") compares time points separately and simultaneously for each group. both carries out jointly both types of comparisons.

alternative

The direction of the alternative to be tested against. Default is two.sided. Options for one-sided testing are greater or less.

level

A numeric value giving the simultaneous confidence level (1 - alpha).

df

A character string specifying the approximation to the degrees of freedom for the multivariate t-distribution. Must be one of ess (effective sample size), adj (adjusted), pb (Pinheiro-Bates), satt (Satterthwaite), kr (Kenward-Roger), con (containment), naive (naive), res (residual), or normal (multivariate normal i.e., "infinite" degrees of freedom). See details.

Details

AICc model selection

four variance structures

specified corration structures

ess uses as degrees of freedom the effective sample size computed under an AR(1)-assumption (Faes et al. 2009).

Computation of in the book of Pinheiro & Bates (2000, p. 91)

Kenward & Roger (1997)

kr uses the Kenward-Roger implementation of Halekoh & Hojsgaard (2013 ZITAT)

naive calculates the number of independent units minus the number of cell means; it is prone to make results conservative (i.e., not exploit their type I error level). In contrast, residual calculates the total number of observations minus the number of cell means and is therefore likely cause anticonservatism.

override model selection procedure by just inserting one var and one cor pattern

Value

A list of class silo with elements

Results

A table listing comparisonwise the estimated difference with standard error, lower and upper simultaneous confidence bounds, value of the test statistic, and multiplicity-adjusted p-value.

CovStat

The covariance matrix of test statistics.

CritValue

The critical value (equicoordinate quantile from a multivariate t-distribution).

Alternative

The direction of the alternative.

ConfLevel

The confidence level as specified via level.

DFMethod

The approximation to the degrees of freedom.

DF

The degrees of freedom used for the multivariate t-distribution (zero if multivariate normal).

ContMat

The contrast matrix.

BestMod

The formula (in R syntax) of the AICc-chosen model.

ModSelTab

A model selection table.

AWBest

The Akaike weight of the AICc-chosen model (with respect to the set of models considered).

CovBest

The estimated covariance matrix of the AICc-chosen model.

Model

The fit of the AICc-chosen model.

Note

Vorsicht bei CAR1

Author(s)

Philip Pallmann pallmann@biostat.uni-hannover.de

References

Burnham, K. P. & Anderson, D. R. (2002) Model Selection and Multimodel Inference: A Practical Information-Theoretic Approach. Second Edition. Springer, New York, NY.

Hothorn, T., Bretz, F., Westfall, P. (2008) Simultaneous inference in general parametric models. Biometrical Journal, 50(3), 346–363.

Kenward, M. G. & Roger, J. H. (1997) Small sample inference for fixed effects from restricted maximum likelihood. Biometrics, 53(3), 983–997.

Pinheiro, J. C. & Bates, D. M. (2000) Mixed-Effects Models in S and S-PLUS. Springer, New York, NY.

Satterthwaite, F. E. (1941) Synthesis of variance. Psychometrika, 6(5), 309–316.

See Also

SimLongiMix, SimLongiMMM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
data(heart)

# Many-to-one comparisons of groups per time point
# taking the third group ("control") as reference

SimLongi(data=heart, response="heartrate", group="drug",
         time="time", id="person", direction="gpt",
         type="Dunnett", base=3)$Results

# The same test using a self-built contrast matrix

library(multcomp)
cmat <- kronecker(contrMat(numeric(3), "Dunnett", base=3), diag(4))
SimLongi(data=heart, response="heartrate", group="drug",
         time="time", id="person", contrasts=cmat)$Results

# All-pairs comparisons of groups per time point,
# and many-to-one comparisons of time points per group
# taking (by default) the first time point ("T1") as reference

SimLongi(data=heart, response="heartrate", group="drug",
         time="time", id="person", direction="both",
         type=c("Tukey", "Dunnett"))$Results

# Many-to-one comparisons of groups per time point
# taking the third group ("control") as reference,
# and many-to-one comparisons of time points per group
# taking the last time point ("T4") as reference

SimLongi(data=heart, response="heartrate", group="drug",
         time="time", id="person", direction="both",
         type="Dunnett", base=c(3, 4))$Results

# DFS HIER NOCH EINBAUEN! (UND EVTL. WEITERE NEUERUNGEN)

PhilipPallmann/SimLongi documentation built on May 8, 2019, 1:34 a.m.