Question 1

In this model, the variables being used are as follows: RD_Exp - The average expenditures on research and development over the past 3 years. PI - Productivity improvements during the current year (Dependent Variable). LagPI - Productivity improvements in the previous year (Concomitant Variable).

We will be testing the hypothesis of: H0: ULow = UMedium = UHigh

We will be using the analysis of covariance model of: Yij = U1 + t2Iij2 + t3Iij3 + yXij + Eij with the variables represented as 1 = Low RDExp, 2 = Mod RDExp, and 3 = High RdExp.

Assumption 1

In Assumoption 1, we are looking to see if the dependent variable, PI, has a normal distribution. Using the Jarque-Bera test, we find that PI is normally distributed with a p-value of .613.

## 
##  Jarque-Bera test for normality
## 
## data:  yy
## JB = 0.73615, p-value = 0.595

Assumption 2

In this test, we are using the levene test to determine the homogeneity of variances. When using this test, we get a p-value of .8639, meaning we can accept the null hypothesis that the variances of PI and RD are the same.

## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Levene's Test for Homogeneity of Variance (center = mean)
##       Df F value Pr(>F)
## group  2  0.1472 0.8639
##       24

Assumption 3

We must see if the dependent and independent variables are linear. Using the graph below, we can see that there is a linear relationship between the two variables. We can also check off that the regression lines are almost parallel based on the graph below.

Assumption 4

For the fourth assumption, we want to see if there is any interaction between RD_Exp and LagPI. Using the interaction effect, we can conclude the variables are not related. However, we also want to see the correlation between the dependent and independent variables. The correlation test shows there is .919 correlation between the two variables.

##              Df Sum Sq Mean Sq F value   Pr(>F)    
## RD_Exp        2 20.125  10.063 220.767 7.93e-15 ***
## LagPI         1 14.045  14.045 308.132 5.01e-14 ***
## RD_Exp:LagPI  2  0.360   0.180   3.953   0.0349 *  
## Residuals    21  0.957   0.046                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Pearson's product-moment correlation
## 
## data:  hw5dat$LagPI and hw5dat$PI
## t = 11.658, df = 25, p-value = 1.331e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.8283174 0.9627996
## sample estimates:
##       cor 
## 0.9190424

Question 2

Since all the assumptions have been met, the ANCOVA analysis can be conducted.

Estimating ANCOVA

When estimating the ANCOVA, both PI and LagPI have significant P-values, allowing us to reject the null hypothesis that the means are the same amongst the different groups. We now need to see which groups have the significant difference since it is unknown.

##                  Df Sum Sq Mean Sq F value   Pr(>F)    
## as.factor(LagPI) 21  35.21   1.677   30.49 0.000638 ***
## Residuals         5   0.28   0.055                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = PI ~ as.factor(LagPI) + RD_Exp, data = hw5dat)
## 
## $`as.factor(LagPI)`
##                    diff         lwr       upr     p adj
## 6.3-5.7    2.000000e-01 -1.76234491 2.1623449 0.9999992
## 6.5-5.7    5.000000e-01 -1.46234491 2.4623449 0.9682921
## 7-5.7      9.000000e-01 -0.79944054 2.5994405 0.4117034
## 7.2-5.7    1.100000e+00 -0.86234491 3.0623449 0.3574763
## 7.9-5.7    2.150000e+00  0.45055946 3.8494405 0.0185093
## 8.2-5.7    1.800000e+00 -0.16234491 3.7623449 0.0704623
## 8.8-5.7    9.000000e-01 -1.06234491 2.8623449 0.5595385
## 8.9-5.7    1.300000e+00 -0.66234491 3.2623449 0.2220369
## 9.4-5.7    1.900000e+00 -0.06234491 3.8623449 0.0569318
## 9.7-5.7    2.000000e+00  0.03765509 3.9623449 0.0462824
## 9.8-5.7    2.100000e+00  0.13765509 4.0623449 0.0378549
## 10-5.7     2.550000e+00  0.99863013 4.1013699 0.0056938
## 10.3-5.7   2.900000e+00  0.93765509 4.8623449 0.0092557
## 10.6-5.7   3.100000e+00  1.13765509 5.0623449 0.0068332
## 10.7-5.7   3.600000e+00  1.63765509 5.5623449 0.0034002
## 11-5.7     2.000000e+00  0.03765509 3.9623449 0.0462824
## 11.5-5.7   2.700000e+00  0.73765509 4.6623449 0.0127643
## 12.1-5.7   3.700000e+00  1.73765509 5.6623449 0.0029813
## 12.2-5.7   3.900000e+00  1.93765509 5.8623449 0.0023114
## 12.3-5.7   3.800000e+00  1.83765509 5.7623449 0.0026212
## 12.8-5.7   4.300000e+00  2.33765509 6.2623449 0.0014513
## 6.5-6.3    3.000000e-01 -1.66234491 2.2623449 0.9997630
## 7-6.3      7.000000e-01 -0.99944054 2.3994405 0.6703263
## 7.2-6.3    9.000000e-01 -1.06234491 2.8623449 0.5595385
## 7.9-6.3    1.950000e+00  0.25055946 3.6494405 0.0282264
## 8.2-6.3    1.600000e+00 -0.36234491 3.5623449 0.1098866
## 8.8-6.3    7.000000e-01 -1.26234491 2.6623449 0.8012543
## 8.9-6.3    1.100000e+00 -0.86234491 3.0623449 0.3574763
## 9.4-6.3    1.700000e+00 -0.26234491 3.6623449 0.0877381
## 9.7-6.3    1.800000e+00 -0.16234491 3.7623449 0.0704623
## 9.8-6.3    1.900000e+00 -0.06234491 3.8623449 0.0569318
## 10-6.3     2.350000e+00  0.79863013 3.9013699 0.0082748
## 10.3-6.3   2.700000e+00  0.73765509 4.6623449 0.0127643
## 10.6-6.3   2.900000e+00  0.93765509 4.8623449 0.0092557
## 10.7-6.3   3.400000e+00  1.43765509 5.3623449 0.0044566
## 11-6.3     1.800000e+00 -0.16234491 3.7623449 0.0704623
## 11.5-6.3   2.500000e+00  0.53765509 4.4623449 0.0179511
## 12.1-6.3   3.500000e+00  1.53765509 5.4623449 0.0038877
## 12.2-6.3   3.700000e+00  1.73765509 5.6623449 0.0029813
## 12.3-6.3   3.600000e+00  1.63765509 5.5623449 0.0034002
## 12.8-6.3   4.100000e+00  2.13765509 6.0623449 0.0018164
## 7-6.5      4.000000e-01 -1.29944054 2.0994405 0.9823419
## 7.2-6.5    6.000000e-01 -1.36234491 2.5623449 0.9030346
## 7.9-6.5    1.650000e+00 -0.04944054 3.3494405 0.0563069
## 8.2-6.5    1.300000e+00 -0.66234491 3.2623449 0.2220369
## 8.8-6.5    4.000000e-01 -1.56234491 2.3623449 0.9948061
## 8.9-6.5    8.000000e-01 -1.16234491 2.7623449 0.6805624
## 9.4-6.5    1.400000e+00 -0.56234491 3.3623449 0.1749996
## 9.7-6.5    1.500000e+00 -0.46234491 3.4623449 0.1383615
## 9.8-6.5    1.600000e+00 -0.36234491 3.5623449 0.1098866
## 10-6.5     2.050000e+00  0.49863013 3.6013699 0.0152787
## 10.3-6.5   2.400000e+00  0.43765509 4.3623449 0.0214534
## 10.6-6.5   2.600000e+00  0.63765509 4.5623449 0.0150990
## 10.7-6.5   3.100000e+00  1.13765509 5.0623449 0.0068332
## 11-6.5     1.500000e+00 -0.46234491 3.4623449 0.1383615
## 11.5-6.5   2.200000e+00  0.23765509 4.1623449 0.0311475
## 12.1-6.5   3.200000e+00  1.23765509 5.1623449 0.0059063
## 12.2-6.5   3.400000e+00  1.43765509 5.3623449 0.0044566
## 12.3-6.5   3.300000e+00  1.33765509 5.2623449 0.0051227
## 12.8-6.5   3.800000e+00  1.83765509 5.7623449 0.0026212
## 7.2-7      2.000000e-01 -1.49944054 1.8994405 0.9999930
## 7.9-7      1.250000e+00 -0.13758739 2.6375874 0.0755734
## 8.2-7      9.000000e-01 -0.79944054 2.5994405 0.4117034
## 8.8-7      0.000000e+00 -1.69944054 1.6994405 1.0000000
## 8.9-7      4.000000e-01 -1.29944054 2.0994405 0.9823419
## 9.4-7      1.000000e+00 -0.69944054 2.6994405 0.3141477
## 9.7-7      1.100000e+00 -0.59944054 2.7994405 0.2384550
## 9.8-7      1.200000e+00 -0.49944054 2.8994405 0.1810573
## 10-7       1.650000e+00  0.44831407 2.8516859 0.0128824
## 10.3-7     2.000000e+00  0.30055946 3.6994405 0.0253306
## 10.6-7     2.200000e+00  0.50055946 3.8994405 0.0167305
## 10.7-7     2.700000e+00  1.00055946 4.3994405 0.0066574
## 11-7       1.100000e+00 -0.59944054 2.7994405 0.2384550
## 11.5-7     1.800000e+00  0.10055946 3.4994405 0.0395096
## 12.1-7     2.800000e+00  1.10055946 4.4994405 0.0056319
## 12.2-7     3.000000e+00  1.30055946 4.6994405 0.0040818
## 12.3-7     2.900000e+00  1.20055946 4.5994405 0.0047854
## 12.8-7     3.400000e+00  1.70055946 5.0994405 0.0022383
## 7.9-7.2    1.050000e+00 -0.64944054 2.7494405 0.2737657
## 8.2-7.2    7.000000e-01 -1.26234491 2.6623449 0.8012543
## 8.8-7.2   -2.000000e-01 -2.16234491 1.7623449 0.9999992
## 8.9-7.2    2.000000e-01 -1.76234491 2.1623449 0.9999992
## 9.4-7.2    8.000000e-01 -1.16234491 2.7623449 0.6805624
## 9.7-7.2    9.000000e-01 -1.06234491 2.8623449 0.5595385
## 9.8-7.2    1.000000e+00 -0.96234491 2.9623449 0.4501550
## 10-7.2     1.450000e+00 -0.10136987 3.0013699 0.0654729
## 10.3-7.2   1.800000e+00 -0.16234491 3.7623449 0.0704623
## 10.6-7.2   2.000000e+00  0.03765509 3.9623449 0.0462824
## 10.7-7.2   2.500000e+00  0.53765509 4.4623449 0.0179511
## 11-7.2     9.000000e-01 -1.06234491 2.8623449 0.5595385
## 11.5-7.2   1.600000e+00 -0.36234491 3.5623449 0.1098866
## 12.1-7.2   2.600000e+00  0.63765509 4.5623449 0.0150990
## 12.2-7.2   2.800000e+00  0.83765509 4.7623449 0.0108437
## 12.3-7.2   2.700000e+00  0.73765509 4.6623449 0.0127643
## 12.8-7.2   3.200000e+00  1.23765509 5.1623449 0.0059063
## 8.2-7.9   -3.500000e-01 -2.04944054 1.3494405 0.9942897
## 8.8-7.9   -1.250000e+00 -2.94944054 0.4494405 0.1579706
## 8.9-7.9   -8.500000e-01 -2.54944054 0.8494405 0.4692101
## 9.4-7.9   -2.500000e-01 -1.94944054 1.4494405 0.9998528
## 9.7-7.9   -1.500000e-01 -1.84944054 1.5494405 0.9999999
## 9.8-7.9   -5.000000e-02 -1.74944054 1.6494405 1.0000000
## 10-7.9     4.000000e-01 -0.80168593 1.6016859 0.8524923
## 10.3-7.9   7.500000e-01 -0.94944054 2.4494405 0.5997892
## 10.6-7.9   9.500000e-01 -0.74944054 2.6494405 0.3600303
## 10.7-7.9   1.450000e+00 -0.24944054 3.1494405 0.0929098
## 11-7.9    -1.500000e-01 -1.84944054 1.5494405 0.9999999
## 11.5-7.9   5.500000e-01 -1.14944054 2.2494405 0.8707525
## 12.1-7.9   1.550000e+00 -0.14944054 3.2494405 0.0720385
## 12.2-7.9   1.750000e+00  0.05055946 3.4494405 0.0443718
## 12.3-7.9   1.650000e+00 -0.04944054 3.3494405 0.0563069
## 12.8-7.9   2.150000e+00  0.45055946 3.8494405 0.0185093
## 8.8-8.2   -9.000000e-01 -2.86234491 1.0623449 0.5595385
## 8.9-8.2   -5.000000e-01 -2.46234491 1.4623449 0.9682921
## 9.4-8.2    1.000000e-01 -1.86234491 2.0623449 1.0000000
## 9.7-8.2    2.000000e-01 -1.76234491 2.1623449 0.9999992
## 9.8-8.2    3.000000e-01 -1.66234491 2.2623449 0.9997630
## 10-8.2     7.500000e-01 -0.80136987 2.3013699 0.5043816
## 10.3-8.2   1.100000e+00 -0.86234491 3.0623449 0.3574763
## 10.6-8.2   1.300000e+00 -0.66234491 3.2623449 0.2220369
## 10.7-8.2   1.800000e+00 -0.16234491 3.7623449 0.0704623
## 11-8.2     2.000000e-01 -1.76234491 2.1623449 0.9999992
## 11.5-8.2   9.000000e-01 -1.06234491 2.8623449 0.5595385
## 12.1-8.2   1.900000e+00 -0.06234491 3.8623449 0.0569318
## 12.2-8.2   2.100000e+00  0.13765509 4.0623449 0.0378549
## 12.3-8.2   2.000000e+00  0.03765509 3.9623449 0.0462824
## 12.8-8.2   2.500000e+00  0.53765509 4.4623449 0.0179511
## 8.9-8.8    4.000000e-01 -1.56234491 2.3623449 0.9948061
## 9.4-8.8    1.000000e+00 -0.96234491 2.9623449 0.4501550
## 9.7-8.8    1.100000e+00 -0.86234491 3.0623449 0.3574763
## 9.8-8.8    1.200000e+00 -0.76234491 3.1623449 0.2820190
## 10-8.8     1.650000e+00  0.09863013 3.2013699 0.0388359
## 10.3-8.8   2.000000e+00  0.03765509 3.9623449 0.0462824
## 10.6-8.8   2.200000e+00  0.23765509 4.1623449 0.0311475
## 10.7-8.8   2.700000e+00  0.73765509 4.6623449 0.0127643
## 11-8.8     1.100000e+00 -0.86234491 3.0623449 0.3574763
## 11.5-8.8   1.800000e+00 -0.16234491 3.7623449 0.0704623
## 12.1-8.8   2.800000e+00  0.83765509 4.7623449 0.0108437
## 12.2-8.8   3.000000e+00  1.03765509 4.9623449 0.0079360
## 12.3-8.8   2.900000e+00  0.93765509 4.8623449 0.0092557
## 12.8-8.8   3.400000e+00  1.43765509 5.3623449 0.0044566
## 9.4-8.9    6.000000e-01 -1.36234491 2.5623449 0.9030346
## 9.7-8.9    7.000000e-01 -1.26234491 2.6623449 0.8012543
## 9.8-8.9    8.000000e-01 -1.16234491 2.7623449 0.6805624
## 10-8.9     1.250000e+00 -0.30136987 2.8013699 0.1147230
## 10.3-8.9   1.600000e+00 -0.36234491 3.5623449 0.1098866
## 10.6-8.9   1.800000e+00 -0.16234491 3.7623449 0.0704623
## 10.7-8.9   2.300000e+00  0.33765509 4.2623449 0.0257777
## 11-8.9     7.000000e-01 -1.26234491 2.6623449 0.8012543
## 11.5-8.9   1.400000e+00 -0.56234491 3.3623449 0.1749996
## 12.1-8.9   2.400000e+00  0.43765509 4.3623449 0.0214534
## 12.2-8.9   2.600000e+00  0.63765509 4.5623449 0.0150990
## 12.3-8.9   2.500000e+00  0.53765509 4.4623449 0.0179511
## 12.8-8.9   3.000000e+00  1.03765509 4.9623449 0.0079360
## 9.7-9.4    1.000000e-01 -1.86234491 2.0623449 1.0000000
## 9.8-9.4    2.000000e-01 -1.76234491 2.1623449 0.9999992
## 10-9.4     6.500000e-01 -0.90136987 2.2013699 0.6531907
## 10.3-9.4   1.000000e+00 -0.96234491 2.9623449 0.4501550
## 10.6-9.4   1.200000e+00 -0.76234491 3.1623449 0.2820190
## 10.7-9.4   1.700000e+00 -0.26234491 3.6623449 0.0877381
## 11-9.4     1.000000e-01 -1.86234491 2.0623449 1.0000000
## 11.5-9.4   8.000000e-01 -1.16234491 2.7623449 0.6805624
## 12.1-9.4   1.800000e+00 -0.16234491 3.7623449 0.0704623
## 12.2-9.4   2.000000e+00  0.03765509 3.9623449 0.0462824
## 12.3-9.4   1.900000e+00 -0.06234491 3.8623449 0.0569318
## 12.8-9.4   2.400000e+00  0.43765509 4.3623449 0.0214534
## 9.8-9.7    1.000000e-01 -1.86234491 2.0623449 1.0000000
## 10-9.7     5.500000e-01 -1.00136987 2.1013699 0.8061660
## 10.3-9.7   9.000000e-01 -1.06234491 2.8623449 0.5595385
## 10.6-9.7   1.100000e+00 -0.86234491 3.0623449 0.3574763
## 10.7-9.7   1.600000e+00 -0.36234491 3.5623449 0.1098866
## 11-9.7     8.881784e-16 -1.96234491 1.9623449 1.0000000
## 11.5-9.7   7.000000e-01 -1.26234491 2.6623449 0.8012543
## 12.1-9.7   1.700000e+00 -0.26234491 3.6623449 0.0877381
## 12.2-9.7   1.900000e+00 -0.06234491 3.8623449 0.0569318
## 12.3-9.7   1.800000e+00 -0.16234491 3.7623449 0.0704623
## 12.8-9.7   2.300000e+00  0.33765509 4.2623449 0.0257777
## 10-9.8     4.500000e-01 -1.10136987 2.0013699 0.9275564
## 10.3-9.8   8.000000e-01 -1.16234491 2.7623449 0.6805624
## 10.6-9.8   1.000000e+00 -0.96234491 2.9623449 0.4501550
## 10.7-9.8   1.500000e+00 -0.46234491 3.4623449 0.1383615
## 11-9.8    -1.000000e-01 -2.06234491 1.8623449 1.0000000
## 11.5-9.8   6.000000e-01 -1.36234491 2.5623449 0.9030346
## 12.1-9.8   1.600000e+00 -0.36234491 3.5623449 0.1098866
## 12.2-9.8   1.800000e+00 -0.16234491 3.7623449 0.0704623
## 12.3-9.8   1.700000e+00 -0.26234491 3.6623449 0.0877381
## 12.8-9.8   2.200000e+00  0.23765509 4.1623449 0.0311475
## 10.3-10    3.500000e-01 -1.20136987 1.9013699 0.9874130
## 10.6-10    5.500000e-01 -1.00136987 2.1013699 0.8061660
## 10.7-10    1.050000e+00 -0.50136987 2.6013699 0.2075972
## 11-10     -5.500000e-01 -2.10136987 1.0013699 0.8061660
## 11.5-10    1.500000e-01 -1.40136987 1.7013699 0.9999997
## 12.1-10    1.150000e+00 -0.40136987 2.7013699 0.1538409
## 12.2-10    1.350000e+00 -0.20136987 2.9013699 0.0862644
## 12.3-10    1.250000e+00 -0.30136987 2.8013699 0.1147230
## 12.8-10    1.750000e+00  0.19863013 3.3013699 0.0303463
## 10.6-10.3  2.000000e-01 -1.76234491 2.1623449 0.9999992
## 10.7-10.3  7.000000e-01 -1.26234491 2.6623449 0.8012543
## 11-10.3   -9.000000e-01 -2.86234491 1.0623449 0.5595385
## 11.5-10.3 -2.000000e-01 -2.16234491 1.7623449 0.9999992
## 12.1-10.3  8.000000e-01 -1.16234491 2.7623449 0.6805624
## 12.2-10.3  1.000000e+00 -0.96234491 2.9623449 0.4501550
## 12.3-10.3  9.000000e-01 -1.06234491 2.8623449 0.5595385
## 12.8-10.3  1.400000e+00 -0.56234491 3.3623449 0.1749996
## 10.7-10.6  5.000000e-01 -1.46234491 2.4623449 0.9682921
## 11-10.6   -1.100000e+00 -3.06234491 0.8623449 0.3574763
## 11.5-10.6 -4.000000e-01 -2.36234491 1.5623449 0.9948061
## 12.1-10.6  6.000000e-01 -1.36234491 2.5623449 0.9030346
## 12.2-10.6  8.000000e-01 -1.16234491 2.7623449 0.6805624
## 12.3-10.6  7.000000e-01 -1.26234491 2.6623449 0.8012543
## 12.8-10.6  1.200000e+00 -0.76234491 3.1623449 0.2820190
## 11-10.7   -1.600000e+00 -3.56234491 0.3623449 0.1098866
## 11.5-10.7 -9.000000e-01 -2.86234491 1.0623449 0.5595385
## 12.1-10.7  1.000000e-01 -1.86234491 2.0623449 1.0000000
## 12.2-10.7  3.000000e-01 -1.66234491 2.2623449 0.9997630
## 12.3-10.7  2.000000e-01 -1.76234491 2.1623449 0.9999992
## 12.8-10.7  7.000000e-01 -1.26234491 2.6623449 0.8012543
## 11.5-11    7.000000e-01 -1.26234491 2.6623449 0.8012543
## 12.1-11    1.700000e+00 -0.26234491 3.6623449 0.0877381
## 12.2-11    1.900000e+00 -0.06234491 3.8623449 0.0569318
## 12.3-11    1.800000e+00 -0.16234491 3.7623449 0.0704623
## 12.8-11    2.300000e+00  0.33765509 4.2623449 0.0257777
## 12.1-11.5  1.000000e+00 -0.96234491 2.9623449 0.4501550
## 12.2-11.5  1.200000e+00 -0.76234491 3.1623449 0.2820190
## 12.3-11.5  1.100000e+00 -0.86234491 3.0623449 0.3574763
## 12.8-11.5  1.600000e+00 -0.36234491 3.5623449 0.1098866
## 12.2-12.1  2.000000e-01 -1.76234491 2.1623449 0.9999992
## 12.3-12.1  1.000000e-01 -1.86234491 2.0623449 1.0000000
## 12.8-12.1  6.000000e-01 -1.36234491 2.5623449 0.9030346
## 12.3-12.2 -1.000000e-01 -2.06234491 1.8623449 1.0000000
## 12.8-12.2  4.000000e-01 -1.56234491 2.3623449 0.9948061
## 12.8-12.3  5.000000e-01 -1.46234491 2.4623449 0.9682921

When looking at the boxplot above, it can be observed that there is a clear difference in the means in the groups. When running the effects test, we can see that High produces a value of 6.32, moderate 7.63, and low 9.47. The linear regression shows that each of the variables are significant. In order to find the difference between the different variables, we need to conduct a test comparing the three. This leaves us with the following null hypotheses:

H0: ULow = UModerate

H0: ULow = UHigh

H0: UModerate = UHigh

## 
##  RD_Exp effect
## RD_Exp
##     High      Low Moderate 
## 6.321737 9.465120 7.631958
## 
## Call:
## lm(formula = PI ~ RD_Exp + LagPI, data = hw5dat)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.52812 -0.16385 -0.00046  0.08379  0.45730 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    -4.15143    0.85827  -4.837 6.99e-05 ***
## RD_ExpLow       3.14338    0.37115   8.469 1.59e-08 ***
## RD_ExpModerate  1.31022    0.19330   6.778 6.51e-07 ***
## LagPI           1.11417    0.07116  15.658 9.27e-14 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2393 on 23 degrees of freedom
## Multiple R-squared:  0.9629, Adjusted R-squared:  0.958 
## F-statistic: 198.8 on 3 and 23 DF,  p-value: < 2.2e-16

Hypothesis 1

Using the first hypothesis, we can reject the null since the p-value is well below the 5% confidence level.

## Linear hypothesis test
## 
## Hypothesis:
## RD_ExpLow - RD_ExpModerate = 0
## 
## Model 1: restricted model
## Model 2: PI ~ RD_Exp + LagPI
## 
##   Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
## 1     24 5.1637                                  
## 2     23 1.3175  1    3.8462 67.142 2.836e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Hypothesis 2

Using the second hypothesis, we can also conclude that the mean of low is not equal to the mean of High since the p-value is well below the confidence interval of 5%.

## Linear hypothesis test
## 
## Hypothesis:
## RD_ExpModerate = 0
## 
## Model 1: restricted model
## Model 2: PI ~ RD_Exp + LagPI
## 
##   Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
## 1     24 3.9494                                  
## 2     23 1.3175  1    2.6319 45.945 6.505e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Hypothesis 3

Using the third hypothesis, we can conclude that the mean of Moderate is not equal to the mean of High using the 5% confidence interval since the p-value is once again well below 5%.

## Linear hypothesis test
## 
## Hypothesis:
## RD_ExpLow = 0
## 
## Model 1: restricted model
## Model 2: PI ~ RD_Exp + LagPI
## 
##   Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
## 1     24 5.4264                                  
## 2     23 1.3175  1    4.1089 71.728 1.591e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Conclusion

Considering the different hypotheses used, we can conclude that the means of the different groups are different from one another. It is visible in the boxplot and is exemplified in each of the hypotheses used.