plot.Explore.WS.Corr: Plot of exploratory within-subject correlations...

Description Usage Arguments Author(s) References See Also Examples

View source: R/plot.Explore.WS.Corr.R

Description

Provides an exploratory plot that allows for examining the within-subject correlations R (reliabilities) as a function if time lag.

Usage

1
2
3
4
5
## S3 method for class 'Explore.WS.Corr'
plot(x, Est.Corrs=TRUE, Indiv.Corrs=FALSE, 
Add.CI=FALSE, Add.CI.Smoothed=TRUE, Smoother.Span=0.2, 
Add.Boot.Corrs=FALSE, Add.CI.Polygon=FALSE, 
ylim=c(-1, 1), xlab="Time Lag", ylab="Reliability", ...)

Arguments

x

A fitted object of class Explore.WS.Corr.

Est.Corrs

Logical. Should the smoothed (loess) correlation function as a function of time lag be added? Default TRUE.

Indiv.Corrs

Logical. Should the estimated correlations for all individual time lags be added? Default FALSE.

Add.CI

Logical. Should a bootstrapped 100(1-α)% Confidence Interval be added around the smoothed correlation function? Default FALSE.

Add.CI.Smoothed

Logical. Should a smoothed bootstrapped 100(1-α)% Confidence Interval be added around the smoothed correlation function? Default FALSE.

Smoother.Span

The smoother span to be used. The smoother span gives the proportion of points in the plot which influence the smooth at each value. Larger values give more smoothness. For details, see https://stat.ethz.ch/R-manual/R-patched/library/stats/html/lowess.html. Defauls Smoother.Span=.2.

Add.Boot.Corrs

Logical. Should the inidividual bootstrapped smoothed (loess) correlation functions be added? Default FALSE.

Add.CI.Polygon

Logical. Similar to Add.CI but adds a grey polygon to mark the a bootstrapped 100(1-α)% Confidence Interval (instead of dashed lines). Default FALSE.

ylim

The minimum and maximum values of the Y-axis. Default ylim=c(-1,1).

xlab

The label of the X-axis. Default xlab="Time Lag".

ylab

The label of the Y-axis. Default ylab="Reliability".

...

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

Explore.WS.Corr, Heatmap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Open data
data(Example.Data)

# Explore correlation structure
Expl_Corr <- Explore.WS.Corr(OLS.Model="Outcome~as.factor(Time)+ 
  as.factor(Cycle) + as.factor(Condition)", Dataset=Example.Data, 
  Id="Id", Time="Time", Alpha=.05, Number.Bootstrap=50, Seed=123)

# explore results
summary(Expl_Corr)

# plot with correlations for all time lags, and 
# add smoothed (loess) correlation function 
plot(Expl_Corr, Indiv.Corrs=TRUE, Add.CI=FALSE, Add.Boot.Corrs=FALSE)
# plot bootstrapped smoothed (loess) correlation function 
plot(Expl_Corr, Add.Boot.Corrs=TRUE)

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