Some models have curves

Lab 4F

Directions: Follow along with the slides and answer the questions in red font in your journal.

Making models do yoga

Problems with lines

xyplot(____ ~ ____, data = ____)
add_curve(movie_linear)

Adding flexibility

Making bend-y models

movie_quad <- lm(____ ~ poly(____, 2), data = training)

Comparing lines and curves

xyplot(____ ~ ____, data = ____)
add_curve(____, col = "blue")
add_curve(____, col = "red")

On your own