correlated observations of bivariate quantities

corre (correlations with random effects)

Marco Cattaneo

Department of Clinical Research, University of Basel

5 September 2024

correlation vs regression

  • LMMs for correlated data points, e.g.:

    lme4::lmer(measure1 ~ measure2 + (1|patient/eye) + (1|doctor), 
               data = OCTimages)
  • or equivalently:

    lme4::lmer(measure1 ~ measure2 + (1|patient) + (1|patient:eye) + (1|doctor), 
               data = OCTimages)
  • goal: estimate correlation (symmetric) between measure1 and measure2 for random patient and doctor

(univariate) random effects model

\[measure_{ijkl} = \mu + patient_i + eye_{ij} + doctor_k + \varepsilon_{ijkl}\]

with  \(patient_i \sim \mathcal{N}(0,\sigma_{pat}^2)\), \(eye_{ij} \sim \mathcal{N}(0,\sigma_{eye}^2)\), \(doctor_k \sim \mathcal{N}(0,\sigma_{doc}^2)\), \(\varepsilon_{ijkl} \sim \mathcal{N}(0,\sigma_\varepsilon^2)\),  all independent


\[\Rightarrow \ \ measure_{ijkl} \sim \mathcal{N}(\mu,\ \sigma_{pat}^2 + \sigma_{eye}^2 + \sigma_{doc}^2 + \sigma_\varepsilon^2)\]

bivariate random effects model

\[\begin{pmatrix} measure_1 \\ measure_2 \end{pmatrix}_{ijkl} = \mu + patient_i + eye_{ij} + doctor_k + \varepsilon_{ijkl}\]

with  \(patient_i \sim \mathcal{N}(0,\Sigma_{pat}^2)\), \(eye_{ij} \sim \mathcal{N}(0,\Sigma_{eye}^2)\), \(doctor_k \sim \mathcal{N}(0,\Sigma_{doc}^2)\), \(\varepsilon_{ijkl} \sim \mathcal{N}(0,\Sigma_\varepsilon^2)\),  all independent


\[\Rightarrow \ \ \begin{pmatrix} measure_1 \\ measure_2 \end{pmatrix}_{ijkl} \sim \mathcal{N}(\mu,\ \Sigma_{pat}^2 + \Sigma_{eye}^2 + \Sigma_{doc}^2 + \Sigma_\varepsilon^2)\]

corre (soon on CRAN)

results of simulation from bivariate random effects model fitted to real data:

  • “naive” estimation:

    cor.test( ~ measure1 + measure2, data = OCTimages)

    RMSE:  0.12,  coverage probability of “95%” CI:  0.51

  • estimation based on bivariate random effects model and multilevel parametric bootstrapping:

    corre(measure1, measure2, list(patient, patient:eye, doctor), data = OCTimages)

    RMSE:  0.11,  coverage probability of “95%” CI:  0.97