Graduate students new to both PhD level econometrics and R may find the introduction to both challenging. One major challenge can be finding the empirical data to complete a Problem Set and then loading it into R.
The hayashir
data package intends to lighten the load on readers of Hayashi’s “Econometrics” who want to follow the empirical parts of the text using R
. The package contains all data used in the book and documentation for each data set is included. Once the package is installed and loaded, all data are ready to use with minimal fuss.
The hayashir
package can be installed using the package devtools.
After installing devtools
, hayashir
is installed by entering:
# install devtools if not already installed
# install.packages(devtools)
devtools::install_github("lachlandeer/hayashir")
into the R console.
Load the hayashir
package and use the data()
function to load the desired data set. The data sets included are:
nerlove
: Nerlove’s electricity supply and cost data, used in Chapter 1mishkin
: Monthly Treasury Bill and inflation rates used in Chapter 2griliches
: NLS-Y data used in Chapter 3.greene
: Christiansen & Greene’s electricty supply and cost data from Chapter 4pwt
: The Summers-Heston (Penn World Table) data for Chapter 5yen
: Yen spot and forward rates for Chapter 6pound
: GB Pound spot and forward rates for Chapter 6dm
: German Deutsche Mark spot and forward rates for Chapter 6lothiantaylor
: US Dollar / British Sterling Exchange rates for Chapter 9moneydemand
: US Money Demand data for Chapter 10To load a data set:
library(hayashir)
data("nerlove")
If using RStudio, View the nerlove
data set
View(nerlove)
Check out the documentation for nerlove
. It includes variable column names, original source of data, as well as sections where the data appear in the text.
?nerlove