I am running a multiple regression of the form Y = $\beta_0$ + $\beta_1$*$X_1$ + $\beta_2$*$X^2_1$ + $\beta_3$*$X_2$ + $\beta_4$*$X_3$ on a time-series dataset. I want to plot the relationship between Y and $X_1$ based on this equation such that I get a curve after taking into account the effects of $X_2$ and $X_3$ (or in other words, after the effects of $X_2$ and $X_3$ are removed from Y). What is the most appropriate way to do this?
1 Answer
You can plot the predicted value of Y from the equation at various levels of $X_1$, but you have to choose values of $X_2$ and $X_3$ for those lines. One choice would be the median value of each.
Taking a step back: 1) Are you sure you want multiple regression on a time series? This can cause some problems (e.g. if Y and any of the X are both increasing over time) 2) Where is 'time' in your formula? Is it one of the X's?
-
$\begingroup$ Thanks for the quick response, Peter. Just to add, time here is the year of data collection. I want to understand how Y changes just as a function $X_1$ in one part of the analysis (given the two other IVs), whereas in a second and separate analysis with a much larger dataset, I want to see how Y changed over time with $X_1$, $X_2$, and $X_3$ as independent variables, may be, with the variable 'time' as a classification variable. My objective in the first case is to plot Y vs. $X_1$ (given the two other IVs), and in the second case to is to see the progression of Y over time. $\endgroup$– KrisDec 7, 2013 at 15:10
-
$\begingroup$ You can see Y as a function of $X_1$ by doing what I suggested. But, as I said, this will give a false picture if both variables are increasing or decreasing over time; any two variables that are linked to time will be linked to each other (e.g. attendance at NFL games and the value of the Dow Jones Industrial average). $\endgroup$ Dec 7, 2013 at 15:13
-
$\begingroup$ That is what we want to know, how Y changes as a function of $X_1$ (e.g. whether Y decreases/increases as $X_1$ decreases/increases, after the effects of two other IVs are taken into account). The relationship of Y and $X_1$, with time, is not linear. $\endgroup$– KrisDec 7, 2013 at 15:36
-
$\begingroup$ As long as both Y and $X_1$ have any relationship with time, any graph or equation that does not account for time will be misleading. $\endgroup$ Dec 7, 2013 at 16:16
-
$\begingroup$ If there is any trend of Y and $X_1$ with time, then what would be best thing to do? Include time T as one of the independent variables in the regression equation to account for this? Thanks for your time. $\endgroup$– KrisDec 7, 2013 at 16:43