View source: R/Explore.WS.Corr.R
Explore.WS.Corr | R Documentation |
This function allows for exploring the within-subject (test-retest) correlation (R) structure in the data, taking relevant covariates into account. Estimated correlations as a function of time lag (= absolute difference between measurement moments t_1 and t_2) are provided as well as their confidence intervals (based on a non-parametric bootstrap).
Explore.WS.Corr(OLS.Model=" ", Dataset, Id, Time, Alpha=0.05, Smoother.Span=.2, Number.Bootstrap=100, Seed=1)
OLS.Model |
|
Dataset |
A |
Id |
The subject indicator. |
Time |
The time indicator. Should be coded as 1, 2, etc. |
Alpha |
The α-level to be used in the non-parametric bootstrap-based Confidence Interval for R. Default |
Smoother.Span |
A smoothing (loess) technique is used to estimate R as a function of time lag. 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 |
Number.Bootstrap |
The number of non-parametric bootstrap samples to be used to estimate the Confidence Interval for R. Default |
Seed |
The seed to be used in the bootstrap. Default |
Est.Corr |
The estimated correlations R as a function of time lag. A smoothing (loess) technique is used to estimate R as a function of time lag (based on the output in |
All.Corrs |
A |
Bootstrapped.Corrs |
A |
Alpha |
The α level used in the estimation of the confidence interval. |
CI.Upper |
The upper bounds of the confidence intervals. |
CI.Lower |
The lower bounds of the confidence intervals. |
Wim Van der Elst, Geert Molenberghs, Ralf-Dieter Hilgers, & Nicole Heussen
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.
plot.Explore.WS.Corr
# 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) # plot bootstrapped smoothed (loess) correlation function plot(Expl_Corr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.