broom
To practice the new tests we’ve learned, we’ll use the built-in mtcars
dataset.
What is the correlation between horsepower and weight? Is it significant?
### answer here
Plot a scatterplot of the rear axle ratio vs. fuel displacement. Does the relationship look linear?
### answer here
Since the relationship looks approximately linear, test it with lm()
### answer here
Do an ANOVA of quarter mile time over the number of cylinders in the the engine.
### answer here)
Now take the same ANOVA from the chunk above and add a post-hoc Tukey test to it.
### answer here
Pick one of the three tests you did above and practice tidying it up with the three broom
functions!
tidy()
Add tidy()
onto end of your test.
### answer here
glance()
Add glance()
onto the end of your test to look at the model parameters.
### answer here
augment()
Add the results of the test back to mtcars using augment()
### answer heres)
Use the augmented table from the chunk above to plot something.
### answer here
Use the tests talked about this week, cor()
, cor.test()
, lm()
, aov()
, and/or TukeyHSD()
to ask two more questions about the mtcars
dataset.
Look at mtcars again. What’s another question you could ask about it? Plot the variable(s) you’re interested in below
### answer here
Based on the variables you just plotted, what’s your question?
Type your question here
Pick one of the tests to answer your question and run it in the chunk below.
### answer here
What do you conclude from your test?
Type your answer here
Look at mtcars again. What’s another question you could ask about it? Plot the variable(s) you’re interested in below
### answer here
Based on the variables you just plotted, what’s your question?
Type your question here Can displacement predict horsepower?
Pick one of the tests to answer your question and run it in the chunk below.
### answer here
What do you conclude from your test?
Type your answer here