I want to use data in order to study the time delay between the diagnosis of Covid-19 and the death from Covid-19 for cases not surviving the disease. the data is from https://github.com/owid/covid-19-data/tree/master/public/data called owid-covid-data.csv. For two functions of time X(t) and Y(t) (here t is discrete, representing for example days) we define the cross-correlation as follows: cross_{corr}(\Delta_t ; X, Y) = Corr(X(t), Y(t+\Delta_t)). That is, the cross-correlation function at the time-delay \Delta_t for two vectors of length n is obtained by computing the Pearson correlation coefficient of the vector X[1,...,n-\Delta_t] with the vector Y[\Delta_t+1,...,n], for \Delta_t>0. For \Delta_t < 0 we replace the role of X and Y in the formula.
I need you to help me write a function that recieves as input a country name and the name of two columns, and computes the value of their cross-correlation in this country for time delay of up to two months apart, that is for all values of \Delta_t between -60 days and 60 days.
The function should return a vector of length 121 representing these correlations.
Thank you.