CorrMixed (version 0.1-13)

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

Description

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

Usage

# S3 method for 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-\alpha)\)% Confidence Interval be added around the smoothed correlation function? Default FALSE.

Add.CI.Smoothed

Logical. Should a smoothed bootstrapped \(100(1-\alpha)\)% 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-\alpha)\)% 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.

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

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataCamp Workspace