#
# Purchasing power parity, revisited
# Previously created data frame of developed countries
#
attach(developed)
pppb <- lm(Exchange.rate.change ~ Inflation.difference)
library(car)
#
# linearHypothesis() function in the car package can be used for testing general linear restrictions.
# The form below says that there are two restrictions, that the intercept equals 0 and that the slope
# for Inflation.difference equals 1. This test also can be constructed directly as is done in the
# handout using Minitab.
#
linearHypothesis(pppb, c("(Intercept) = 0", "Inflation.difference = 1"))
#
# Previously created data frame of developing countries without Brazil
#
attach(newdeveloping)
pppd <- lm(Exchange.rate.change ~ Inflation.difference)
linearHypothesis(pppd,c("(Intercept) = 0", "Inflation.difference = 1"))