Exercise

# Regression output: example I

The following code provides two equivalent methods for calculating the most important pieces of the linear model output. Recall that the p-value is the probability of the observed data (or more extreme) given the null hypothesis is true. As with inference in other settings, you will need the sampling distribution for the statistic (here the slope) assuming the null hypothesis is true. You will generate the null sampling distribution in later chapters, but for now, assume that the null sampling distribution is correct. Additionally, notice that the standard error of the slope and intercept estimates describe the variability of those estimates.

Instructions

**100 XP**

- Load the
`mosaicData`

package and load the`RailTrail`

data. The`RailTrail`

data contains information about the number of users of a trail in Florence, MA and the weather for each day. - Using the
`lm()`

function, run a linear model regressing the`volume`

of riders on the`hightemp`

for the day. Assign the output of the`lm()`

function to the object`ride_lm`

. - Use the
`summary()`

function on the linear model output to see the inferential analysis (including the p-value for the slope). - Additionally,
`tidy()`

the linear model output to make it easier to use later.