06.09.2021 Views

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 15.4: A 3D visualisation of a multiple regression model. There are two predictors in the model,<br />

dan.sleep <strong>and</strong> baby.sleep; the outcome variable is dan.grump. Together, these three variables <strong>for</strong>m a 3D<br />

space: each observation (blue dots) is a point in this space. In much the same way that a simple linear<br />

regression model <strong>for</strong>ms a line in 2D space, this multiple regression model <strong>for</strong>ms a plane in 3D space.<br />

When we estimate the regression coefficients, what we’re trying to do is find a plane that is as close to<br />

all the blue dots as possible. (This plot was drawn using the scatter3d() function in the car package,<br />

<strong>and</strong> it looked much nicer be<strong>for</strong>e it got butchered by the image conversion process that I used to get it<br />

into the book pdf)<br />

- 463 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!