CorrMixed (version 0.1-1)

WS.Corr.Mixed.SAS: Estimate within-subject (test-retest) correlations based on a mixed-effects model using the SAS proc MIXED output.

Description

This function allows for the estimation of the within-subject correlations using a general and flexible modeling approach that allows at the same time to capture hierarchies in the data, the presence of covariates, and the derivation of correlation estimates. The output of proc MIXED (SAS) is used as the input for this function. Confidence intervals for the correlations based on the Delta method are provided.

Usage

WS.Corr.Mixed.SAS(Model, D, Sigma2, Asycov, Rho, Tau2, Alpha=0.05, Time)

Arguments

Model
The type of model that should be fitted. Model=1: random intercept model, Model=2: random intercept and serial correlation, and Model=3: random intercept, slope, and serial correlation. Default Model=1.
D
The $D$ matrix of the fitted model.
Sigma2
The residual variance.
Asycov
The asymptotic correlation matrix of covariance parameter estimates.
Rho
The $\rho$ component of the fitted model which determines the matrix $H_{i}$, $\rho(|t_{ij}-t_{ik}|)$. This component is only needed when serial correlation is involved, i.e., when Model $2$ or $3$ used.
Tau2
The $\tau^2$ component of the fitted model. This component is only needed when serial correlation is involved (i.e., when Model $2$ or $3$ used), $\varepsilon_{2} \sim N(0, \tau^2 H_{i}))$.
Alpha
The $\alpha$-level to be used in the computation of the Confidence Intervals around the within-subject correlation. The Confidence Intervals are based on the Delta method. Default Alpha=0.05.
Time
The time points available in the dataset on which the analysis was conducted.

Value

  • ModelThe type of model that was fitted.
  • RThe estimated within-subject correlations.
  • AlphaThe $\alpha$-level used to computed the Confidence Intervals around $R$.
  • CI.UpperThe upper bounds of the confidence intervals (Delta-method based).
  • CI.LowerThe lower bounds of the confidence intervals (Delta-method based).
  • TimeThe time values in the dataset.

References

Van der Elst, W., Molenberghs, G., Hilgers, R., & Heussen, N. (2015). Correlation in continuous monitoring of vital parameters - estimating reliability using linear mixed-effects models. Submitted.

See Also

WS.Corr.Mixed

Examples

Run this code
# Open data 
data(Example.Data)

# Estimate R and Delta method-based CI 
# based on SAS output of fitted Model 2

# First specify asycov matrix
Asy_mat <- matrix(c(129170, -10248, -12.0814, -74.8605,
                    -10248, 25894, 21.0976, -50.1059,
                    -12.0814, 21.0976, 0.07791, 1.2120,
                    -74.8605, -50.1059, 1.212, 370.65), nrow = 4)
Model2_SAS <-  WS.Corr.Mixed.SAS(Model="Model 2", 
D=500.98, Tau2=892.97, Rho=3.6302, Sigma2=190.09, 
Asycov = Asy_mat, Time=c(1:45))                               
summary(Model2_SAS)
plot(Model2_SAS)

Run the code above in your browser using DataCamp Workspace