# How to determine the influence of a variable on the relationship between another two variables?

I have three continuous variables X, Y, and Z in the form of timeseries at several geographic locations. All variables have a skewed distribution because the timeseries mostly have zeros in them except for peaks. Peaks in Z follow that in Y which in turn follow that in X in time. None of these variables are known to follow a normal distribution. However, a log-transformation usually makes them all normal. Y and Z are supposed to have a non-linear relationship that varies with location. X has little effect on Y, but it can influence the relationship between Y and Z.

What methods can I use to quantify the influence of X on the relationship between Y and Z?

Apologies for the layman language, I have little experience with statistics.

In the plot, X = red bars, Y = purple bars, and Z = blue bars. The plot is for the year 2019 and I have 20 years of data (2000-2019) across 60 locations. All time-series are observed at the same time points; daily steps from January 1, 2000, to December 31, 2019. I am only interested in the peaks of Z and the value of Y a day before. For variable X, I would use the cumulative sum since the beginning of the year until the time of Y (eg., a peak of Z occurs on June 15, 2010; Z = value on June 15, Y = value on June 14, and X = sum of values from January 1, 2010, to June 15, 2010). Z can have multiple peaks in a year.

Please ignore the scales and grey lines.

• Are the time series observed at the same time points? How many points? Can you augment your post with some plots, and maybe (a link to) the data? – kjetil b halvorsen Aug 2 '20 at 19:09
• I have included a plot and its description. I hope that makes the question a bit more clear. – navajyothmp Aug 2 '20 at 19:42