From 36a67dd3880fad3ffd05882a46d49b0f04cd4805 Mon Sep 17 00:00:00 2001 From: Jordan <36420801+jrdnbradford@users.noreply.github.com> Date: Mon, 8 Feb 2021 12:32:34 -0500 Subject: [PATCH] Two typo fixes for model basics chapter (#908) * Remove typo * Make model function naming convention consistent --- model-basics.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model-basics.Rmd b/model-basics.Rmd index ccd074f..d50386f 100644 --- a/model-basics.Rmd +++ b/model-basics.Rmd @@ -321,7 +321,7 @@ This looks like random noise, suggesting that our model has done a good job of c You've seen formulas before when using `facet_wrap()` and `facet_grid()`. In R, formulas provide a general way of getting "special behaviour". Rather than evaluating the values of the variables right away, they capture them so they can be interpreted by the function. -The majority of modelling functions in R use a standard conversion from formulas to functions. You've seen one simple conversion already: `y ~ x` is translated to `y = a_1 + a_2 * x`. If you want to see what R actually does, you can use the `model_matrix()` function. It takes a data frame and a formula and returns a tibble that defines the model equation: each column in the output is associated with one coefficient in the model, the function is always `y = a_1 * out1 + a_2 * out_2`. For the simplest case of `y ~ x1` this shows us something interesting: +The majority of modelling functions in R use a standard conversion from formulas to functions. You've seen one simple conversion already: `y ~ x` is translated to `y = a_1 + a_2 * x`. If you want to see what R actually does, you can use the `model_matrix()` function. It takes a data frame and a formula and returns a tibble that defines the model equation: each column in the output is associated with one coefficient in the model, the function is always `y = a_1 * out_1 + a_2 * out_2`. For the simplest case of `y ~ x1` this shows us something interesting: ```{r} df <- tribble(