I am using R to perform my analyses.
I have five datasets: 365 rainfall measurements in a year; 4 x 365 height values in runoff drains located close to each other in the same year.
The graph plots of the drain data exhibit very similar patterns. The majority of the differences in the patterns are due to missing values randomly distributed arising from equipment failure.
The rainfall data seem broadly similar to the drain data. Where there are spikes in rainfall there are spikes in the drain data. I do not know as yet if there are any lags between rainfall and drain data.
Parallel plot of Precipitation and Drain Data:
I have two questions that involve determining the similarity between the time series of aperiodic data.
By which criteria may I justifiably merge the drain datasets to "fill in" the missing data?
How may I compare the rainfall data to the drain data so that I may say to what extent the one caused the other?
I have briefly experimented with using arima()
in R but I don't understand how to use the output.
I have a suspicion I should be using the grangertest()
function, but I don't know how to implement it on two or more datasets.
Any assistance or advice would be sincerely appreciated.