I am interested in looking at the correlation between two types of heart function measurements over time. test1
can be considered the true value. The true value (test1
) changes over time, but not much whereas test2
changes a lot.
The hypothesis is that the two tests have a good correlation in the beginning, and then the new type of measurement (test2
) loses its ability to follow test1
, but I need to quantify it somehow.
I was thinking of some way of measuring if test2
becomes less correlated with test1
at each time point. Maybe using the correlation at baseline as a reference.
I have four distinct measuring time
points (factor), my testtype
(2 types) as factor and my output (value
) is continuous on both test 1 and 2 but very different scales. Finally, I would use the subject
(ID) for the random effect.
So my idea was to do a mixed model like this (using R
):
lme(value ~ time * testtype, random = ~ 1 | subject, data = df, na.action = na.omit)
My output would then be estimates for test overall, time1
vs time2
, time1
vs time3
etc. And finally test1:time2
, test1:time3
, etc.
My question is can I use this method to evaluate if the correlation between tests is different at different time
points?
And how do I turn the estimates with standard error into something meaningful?
Something I can interpret as "the correlation between tests at time2
was xx lower than at time1
."
EDIT: Using Dimitris model I get a correlation structure like this:
1 2 3 4 5 6 7 8
1 1.0000000 0.2868521 0.2868521 0.2868521 0.1973987 0.1973987 0.1973987 0.1973987
2 0.2868521 1.0000000 0.2868521 0.2868521 0.1973987 0.1973987 0.1973987 0.1973987
3 0.2868521 0.2868521 1.0000000 0.2868521 0.1973987 0.1973987 0.1973987 0.1973987
4 0.2868521 0.2868521 0.2868521 1.0000000 0.1973987 0.1973987 0.1973987 0.1973987
5 0.1973987 0.1973987 0.1973987 0.1973987 1.0000000 0.6351789 0.6351789 0.6351789
6 0.1973987 0.1973987 0.1973987 0.1973987 0.6351789 1.0000000 0.6351789 0.6351789
7 0.1973987 0.1973987 0.1973987 0.1973987 0.6351789 0.6351789 1.0000000 0.6351789
8 0.1973987 0.1973987 0.1973987 0.1973987 0.6351789 0.6351789 0.6351789 1.0000000
EDIT 2 For Dimitri - Here is the output from getVarCov(fm)
Marginal variance covariance matrix
1 2 3 4 5 6 7
1 133.240 38.220 38.220 43.692 43.692 43.692 43.692
2 38.220 133.240 38.220 43.692 43.692 43.692 43.692
3 38.220 38.220 133.240 43.692 43.692 43.692 43.692
4 43.692 43.692 43.692 367.700 233.550 233.550 233.550
5 43.692 43.692 43.692 233.550 367.700 233.550 233.550
6 43.692 43.692 43.692 233.550 233.550 367.700 233.550
7 43.692 43.692 43.692 233.550 233.550 233.550 367.700
Standard Deviations: 11.543 11.543 11.543 19.175 19.175 19.175 19.175
value
from test1 the same outcome as thevalue
from test2? $\endgroup$ – Dimitris Rizopoulos Oct 18 '18 at 6:23