# How can I analyse the effect of one variable on another if they were each recorded at different times? (Individual panel data with linked variables)

I have panel data from a popular election study and linked data, collected seperately, on all of the respondents. This means that I can link respondents detailed personal economic data, for example, to their voting behaviour.

The problem I have is that the linked data were recorded at different points in time to the panel data. Ideally, I'd like to use both the linked and the panel data in an analysis like the example above. Typically, I'd do this using a multilevel model for change, but that's not able to handle the differing timings of the two variables.

A toy version of the data for two respondents might look something like this, where X come from the panel data and Y from the linked data. I've added a 1 where a value is present, but this could theoretically take any value.

ID    Time    X    Y
1     1       1    NA
1     1.5     NA   1
1     1.9     NA   1
1     2       1    NA
1     2.2     NA   1
2     1       1    NA
2     1.7     NA   1
2     1.8     NA   1
2     2       1    NA
2     2.4     NA   1


Is there a model that can handle this kind of data? Preferably one that I can implement in R. I imagine that this is a common problem in econometrics where time series might differ in how often they have been recorded, but I'm not sure if it's generalisable to individual-level data.