\begin{Schunk}
\begin{Sinput}
 ddir <- "data"
 fn <- "OLS_data.csv"
 dat <- read.csv(file.path(ddir, fn))
 # Make text variable into R factor
 dat$x3f <- factor(dat$x3, levels = c(0, 1, 2), 
                 labels = c("lo", "med", "hi"))
\end{Sinput}
\end{Schunk}
