Analyzing Impact of a Single Independent Time Series Variable on a Cluster of Dependent Variables in R

41 views Asked by At

Hello Stack Overflow Community,

I am an economic researcher seeking statistical advice for an analysis I am conducting in R. My dataset includes one independent time series variable, X, and a large cluster of dependent time series variables, Y1, Y2, ..., Y500.

I aim to understand the collective impact of X on the entire cluster of Y variables from an explanatory perspective, rather than building a predictive model. I am interested in methodologies or statistical techniques suitable for this explanatory analysis.

  1. What are the appropriate statistical tests or models for analyzing the impact of an independent time series variable on a cluster of dependent variables in an explanatory context?

  2. Is the Granger causality method suitable for this kind of dataset, and how can it be applied effectively?

  3. Given the large number of dependent variables, how can I effectively group them to analyze their collective response to changes in X?

  4. Are there specific R packages or functions that are particularly suited for this type of clustered time series analysis?

Your guidance, suggestions, or references to relevant R resources would be immensely helpful. Thank you in advance for your assistance!

1

There are 1 answers

0
Oyindamola Gideon Olarewaju On

It is an intriguing challenge to analyze the effect of an independent time series variable on a cluster of dependent variables. You can take a few different routes with this explanatory analysis. Here are some recommendations:

Granger Causality Test: If you want to investigate the causal connections between your independent variable (X) and each of the dependent variables (Y1, Y2,..., Y500), Granger causality can be an appropriate approach. The main concept is to see if previous values of X can tell us more about future values of Y than we currently know from previous values of Y.

Granger causality tests in R can be conducted with the grangertest function from the lmtest package. Prior to running the test, make sure to verify that your time series is stationar.

   For instance:

    install.packages("lmtest")
    library(lmtest)

    # Assuming tsX and tsY are your time series
    grangertest(tsY ~ tsX, order = your_lag_order, data = your_data)

Cluster Analysis: Your dependent variables can be grouped according to how they react to changes in X by using cluster analysis. This can assist you in determining subsets of variables that behave similarly.

For instance:

      # Assuming tsY is your dependent variable
      your_data <- data.frame(tsX, tsY)
      cluster_result <- kmeans(your_data, centers = 
      your_number_of_clusters)