Suppose I have two dependent variables X and Y which depend upon an independent value t. I would like to model corr(X,Y) ~ t so that I can detect if the correlation between X and Y changes over time. Specifically, I want the correlation to be conditioned on t and linearly (or more generally smoothly) varying with t, but the measurements may all be at distinct t values so I can't just compute corr(X,Y) at each value of t.
Is there any literature on this? I imagine it's well-studied but I don't know the right keywords and searching for the obvious terms only gives me mountains of elementary material on regression and correlation.
I have some ideas for solving this of my own but I don't want to overlook existing literature. My simplest idea is to regress something like X ~ Y * t and look for interaction of Y and t. That's not quite what I'm looking for, though; the fit values aren't correlations and Y has measurement error, too. Another is to regress XY ~ t which has similar short-comings. I'd be more satisfied with something like a regression of (X,Y) = epsilon where epsilon is drawn iid from N(0, Sigma(t)) and Sigma(t) is a correlation matrix parameterized by t.
(x,y)at some timetbut each value oftmay be distinct at different(x,y)points. It is longitudinal, though I'm guessing the theory is applicable in general contexts. I would also like to include dependence of mean values ofXandYontbut left that out for simplicity here as it seems like a second layer of complexity. – user32157 Jul 11 '23 at 17:36XY ~ tseems not totally off at first glance. – Ute Jul 11 '23 at 18:16Rpackage implements a changepoint detection method that, among other things, can find changes in the covariance of a vector process. It is based on an (effectively) online estimate of the multivariate distribution of $(X_t,Y_t).$ – whuber Jul 11 '23 at 18:44X, Y, tare all continuous numeric, yes. – user32157 Jul 11 '23 at 19:26corr(X,Y)as a function of time plot. Nonetheless, a good idea to get up to speed with that option incase it's the best I've got. – user32157 Jul 11 '23 at 19:29X ~ tandY ~ tseparately, just for the mean? And some model for how the variances of X and Y behave as a function of t (not necessarily homoscedasticity)? Variance, covariance, are less "easy" to estimate, so a strong model forSigma(t)could help. How many data do you have? – Ute Jul 11 '23 at 20:59