# Example 10.1, Static Phillips Curve
# Data set: phillips
# Function for result reporting
source("_report.R")
# Load the data and estimate the model in the background
load("phillips.Rdata")
data=data[data$year<=1996,] # Refine the data
names(data)[names(data)=="inf"]="inf.t"
names(data)[names(data)=="unem"]="unem.t"
data=ts(data,start=1948,frequency=1)
model=lm(inf.t~unem.t,data=data)
dig=c(2,3,3)
# Describe the model
cat("Model to estimate: inf.t = beta0 + beta1 * unem.t + u.t",
"\nwhere inf is ", paste(desc[desc[,1]=="inf",2]),
"\nand unem is ", paste(desc[desc[,1]=="unem",2]),
sep="")
# Report results
{
cat("The estimated regression line is")
reportreg(model,dig,suffix=".hat",adj=T)
}
# Interpretation
cat("The coefficient on unem.t is positive, so the static Phillips curve does not suggest a tradeoff between unem and inf. The t statistic on beta1hat is ",
printt(model,2,dig[2]), ", and the p-value against a two-sided alternative is about ",
round(summary(model)$coef[2,"Pr(>|t|)"],2), ". Thus, if anything, there is a positive relationship between inf and unem",
"\nHowever, it is important to note that the static Phillips curve is probably not the best model for determining whether there is a short-run run tradeoff between inflation and unemployment",
sep="")