library(dplyr)
library(wooldridge)
library(car)
library(tseries)
data("minwage")
minwage232 <- minwage %>% 
  select(gwage232, gemp232, gmwage, gcpi) %>% 
  na.omit()

C12

(i)

acf(minwage232$gwage232)

The ACF plot suggests that the gwage232 series appear to be weakly dependent

(ii)

summary(lm(gwage232[2:nrow(minwage232)] ~ gwage232[1:(nrow(minwage232)-1)] + gmwage[2:nrow(minwage232)] + gcpi[2:nrow(minwage232)], data = minwage232))
## 
## Call:
## lm(formula = gwage232[2:nrow(minwage232)] ~ gwage232[1:(nrow(minwage232) - 
##     1)] + gmwage[2:nrow(minwage232)] + gcpi[2:nrow(minwage232)], 
##     data = minwage232)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.044642 -0.004134 -0.001312  0.004482  0.041612 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         0.0024003  0.0004308   5.572 3.79e-08 ***
## gwage232[1:(nrow(minwage232) - 1)] -0.0779092  0.0342851  -2.272  0.02341 *  
## gmwage[2:nrow(minwage232)]          0.1518459  0.0096485  15.738  < 2e-16 ***
## gcpi[2:nrow(minwage232)]            0.2630876  0.0824457   3.191  0.00149 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.007889 on 606 degrees of freedom
## Multiple R-squared:  0.2986, Adjusted R-squared:  0.2951 
## F-statistic: 85.99 on 3 and 606 DF,  p-value: < 2.2e-16

The results from the regression indicates that an increase in the federal minimum wage result in a contemporaneous increase in gwage232. The very small value of p-value supports the conclusion.

(iii)

summary(lm(gwage232[2:nrow(minwage232)] ~ gwage232[1:(nrow(minwage232)-1)] + gmwage[2:nrow(minwage232)] + gcpi[2:nrow(minwage232)] + gemp232[1:(nrow(minwage232)-1)] , data = minwage232))
## 
## Call:
## lm(formula = gwage232[2:nrow(minwage232)] ~ gwage232[1:(nrow(minwage232) - 
##     1)] + gmwage[2:nrow(minwage232)] + gcpi[2:nrow(minwage232)] + 
##     gemp232[1:(nrow(minwage232) - 1)], data = minwage232)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.043842 -0.004378 -0.001034  0.004321  0.042548 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         0.002451   0.000426   5.753  1.4e-08 ***
## gwage232[1:(nrow(minwage232) - 1)] -0.074546   0.033901  -2.199 0.028262 *  
## gmwage[2:nrow(minwage232)]          0.152707   0.009540  16.007  < 2e-16 ***
## gcpi[2:nrow(minwage232)]            0.252296   0.081544   3.094 0.002066 ** 
## gemp232[1:(nrow(minwage232) - 1)]   0.066131   0.016962   3.899 0.000108 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.007798 on 605 degrees of freedom
## Multiple R-squared:  0.3158, Adjusted R-squared:  0.3112 
## F-statistic:  69.8 on 4 and 605 DF,  p-value: < 2.2e-16

The coefficient for the variable is statistically significant.

(iv)

summary(lm(gwage232[2:nrow(minwage232)] ~ gmwage[2:nrow(minwage232)] + gcpi[2:nrow(minwage232)], data = minwage232))
## 
## Call:
## lm(formula = gwage232[2:nrow(minwage232)] ~ gmwage[2:nrow(minwage232)] + 
##     gcpi[2:nrow(minwage232)], data = minwage232)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.044464 -0.004095 -0.001352  0.004545  0.041188 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                0.0021904  0.0004222   5.188  2.9e-07 ***
## gmwage[2:nrow(minwage232)] 0.1505574  0.0096648  15.578  < 2e-16 ***
## gcpi[2:nrow(minwage232)]   0.2427430  0.0822388   2.952  0.00328 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.007916 on 607 degrees of freedom
## Multiple R-squared:  0.2926, Adjusted R-squared:  0.2903 
## F-statistic: 125.5 on 2 and 607 DF,  p-value: < 2.2e-16

The estimate for the coefficient of the gmwage variable for the with and without lags models are 0.152707 and 0.1505574 respectively. Adding the two lagged variables does not have much of an effect on the gmwage coefficient.

(v)

summary(lm(gmwage[2:nrow(minwage232)] ~ gwage232[1:(nrow(minwage232)-1)] + gemp232[1:(nrow(minwage232)-1)] , data = minwage232))
## 
## Call:
## lm(formula = gmwage[2:nrow(minwage232)] ~ gwage232[1:(nrow(minwage232) - 
##     1)] + gemp232[1:(nrow(minwage232) - 1)], data = minwage232)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.01914 -0.00500 -0.00379 -0.00287  0.62208 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                         0.003433   0.001440   2.384   0.0174 *
## gwage232[1:(nrow(minwage232) - 1)]  0.203167   0.143140   1.419   0.1563  
## gemp232[1:(nrow(minwage232) - 1)]  -0.041706   0.072110  -0.578   0.5632  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.03318 on 607 degrees of freedom
## Multiple R-squared:  0.00392,    Adjusted R-squared:  0.0006377 
## F-statistic: 1.194 on 2 and 607 DF,  p-value: 0.3036

The R-squared when running the regression of gmwage on the lagged variables gwage232 and gemp232 is 0.00392, suggesting that the variations in the gmwage variable is weakly correlated with the lagged variables gwage232 and gemp232.