## The dataset \texttt{horse_prices} contains observations on the sale
## price and age (plus a few other variables) for 50 race horses. We
## will investigate how well age predicts a race horses sales price.
## https://raw.githubusercontent.com/roualdes/data/master/horse_prices.csv
## Read in the dataset using the funciton read.csv.
## Make an appropriate ggplot2 plot of the variables Age and Price.
## The variable that does the explaining, the explanatory variable,
## should go on the x-axis. Store your plot into a variable p.
## Does a linear model appear reasonable for these data? Explain.
## Assume (anyway) that Price and Age are linearly related via the
## simple linear regression model. Use the likelihood method together
## with optim to estimate the (population) linear relationship between
## Age and Price. The explanatory variable should be multiplied by
## the slope.
## Add this line to your plot p via the ggplot layer (function)
## stat_smooth(se=FALSE, method=''lm'').
## Say something interesting, in a complete English sentence, about
## how reasonable this model is for these data.
## Write 2 complete English sentences describing this estimated model
## in context of these data, one for the slope and one for the
## intercept.
## Using the bootstrap method, calculate a 87% confidence interval for
## the population intercept and slope that describe the linear
## relationship between Age and Price.
## Write a complete English sentence describing each confidence
## interval in the context of these data.
## Add one line for each of the bootstrap estimated lines (both
## intercept and slope) to your plot \texttt{p}. Color the line blue
## and make it $50$\% transparent with the argument
## \texttt{alpha}. Hints: See ? scales::alpha and
## ?ggplot2::geom\_abline. You will need to turn your bootstrap
## estimates into a dataframe first. If you used boot::boot(), your
## \texttt{R} estimates are in the element named t within the object
## returned from boot::boot().