How can you control for variables trending linearly over time in your regression model?

Question

You are commissioned by the White House to investigate the relationship between consumer prices and approval rates of the President.

You are given access to the APPROVAL dataset. The dataset consists of 78 months of data during the presidency of George W. Bush (ending in July 2007, before Bush left office). In addition to economic variables and binary indicators for various events, it includes an approval rate, approval, collected by Gallup.

i) Create a line graph with values for cpi on the left y-axis and values for approve on the right y-axis. Check for a linear trend in both variables. Hint: This time, you need to create the ‘date’ variable before even declaring it for time-series use. These are monthly data, so you might want to type ‘help ym’ for more insights. The full command is `gen date = ym(year, month)’. You also need to generate the initial linear time trend. The command is `gen t = _n’.

ii) What is the median of the variable approve? Is it larger or smaller than the average value? Use the graph from part i) to explain why.

iii) Estimate the model

lap provet = 0o + I3ilcpit + ut,

where lap provet and pipit are the logarithmic forms of approver and cpit, respectively. Interpret the coefficients.

iv) How can you control for variables trending linearly over time in your regression model? Estimate a model that controls for linearly trending variables. Do the results from iii) change?

v) What other variables might be important to include? What happens if you omit them from your regression model?