if(!requireNamespace("dynlm")) {
if(interactive() || is.na(Sys.getenv("_R_CHECK_PACKAGE_NAME_", NA))) {
stop("not all packages required for the example are installed")
} else q() }
data("BenderlyZwick")
plot(BenderlyZwick)
## Benderly and Zwick (1985), p. 1116
library("dynlm")
bz_ols <- dynlm(returns ~ growth + inflation,
data = BenderlyZwick/100, start = 1956, end = 1981)
summary(bz_ols)
## Zaman, Rousseeuw and Orhan (2001)
## use larger period, without scaling
bz_ols2 <- dynlm(returns ~ growth + inflation,
data = BenderlyZwick, start = 1954, end = 1981)
summary(bz_ols2)
Run the code above in your browser using DataLab