plot.WS.Corr.Mixed: Plot the within-subject correlations (reliabilities) obtained...

Description Usage Arguments Author(s) References See Also Examples

Description

Plots the within-subject correlations (reliabilities) and 100(1-α)% Confidence Intervals based on the fitted mixed-effect models.

Usage

1
2
## S3 method for class 'WS.Corr.Mixed'
plot(x, xlab, ylab, ylim, main, All.Individual=FALSE, ...)

Arguments

x

A fitted object of class WS.Corr.Mixed

xlab

The label of the X-axis.

ylab

The label of the Y-axis.

ylim

The min, max values of the Y-axis.

main

The main title of the plot.

All.Individual

Logical. Should correlation functions be provided that show the correlations between all indidual measurement moments R(t_{i},t_{k})? Argument is only used if Model 2 was fitted. Default All.Individual=FALSE.

...

Other arguments to be passed to the plot function.

Author(s)

Wim Van der Elst, Geert Molenberghs, Ralf-Dieter Hilgers, & Nicole Heussen

References

Van der Elst, W., Molenberghs, G., Hilgers, R., & Heussen, N. (2015). Estimating the reliability of repeatedly measured endpoints based on linear mixed-effects models. A tutorial. Submitted.

See Also

WS.Corr.Mixed, plot WS.Corr.Mixed

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
35
36
37
38
39
40
41
42
43
44
45
# open data
data(Example.Data)

# Make covariates used in mixed model
Example.Data$Time2 <- Example.Data$Time**2
Example.Data$Time3 <- Example.Data$Time**3
Example.Data$Time3_log <- (Example.Data$Time**3) * (log(Example.Data$Time))

# model 1: random intercept model
Model1 <- WS.Corr.Mixed(
Fixed.Part=Outcome ~ Time2 + Time3 + Time3_log + as.factor(Cycle) 
+ as.factor(Condition), Random.Part = ~ 1|Id, 
Dataset=Example.Data, Model=1, Id="Id", Number.Bootstrap = 50, 
Seed = 12345)

  # plot the results
plot(Model1)

## Not run: time-consuming code parts
# model 2: random intercept + Gaussian serial corr
Model2 <- WS.Corr.Mixed(
Fixed.Part=Outcome ~ Time2 + Time3 + Time3_log + as.factor(Cycle) 
+ as.factor(Condition), Random.Part = ~ 1|Id, 
Correlation=corGaus(form= ~ Time, nugget = TRUE),
Dataset=Example.Data, Model=2, Id="Id", Seed = 12345)

  # plot the results
    # estimated corrs as a function of time lag (default plot)
plot(Model2)
    # estimated corrs for all pairs of time points
plot(Model2, All.Individual = T)

# model 3
Model3 <- WS.Corr.Mixed(
  Fixed.Part=Outcome ~ Time2 + Time3 + Time3_log + as.factor(Cycle) 
  + as.factor(Condition), Random.Part = ~ 1 + Time|Id, 
  Correlation=corGaus(form= ~ Time, nugget = TRUE),
  Dataset=Example.Data, Model=3, Id="Id", Seed = 12345)

  # plot the results
    # estimated corrs for all pairs of time points
plot(Model3)
    # estimated corrs as a function of time lag

## End(Not run)

CorrMixed documentation built on May 2, 2019, 3:26 p.m.