Adds two missing dollar signs to model.Rmd
This commit is contained in:
parent
55ab16f27f
commit
0557e58ca0
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
output: pdf_document
|
||||
---
|
||||
# Model
|
||||
|
||||
A model is a function that summarizes how the values of one variable vary in relation to the values of other variables. Models play a large role in hypothesis testing and prediction, but for the moment you should think of models just like you think of statistics. A statistic summarizes a *distribution* in a way that is easy to understand; and a model summarizes *covariation* in a way that is easy to understand. In other words, a model is just another way to describe data.
|
||||
|
@ -127,7 +130,7 @@ ggplot(data = heights, mapping = aes(x = height, y = income)) +
|
|||
|
||||
`lm()` treats the variable(s) on the right-hand side of the formula as _explanatory variables_ that partially determine the value of the variable on the left-hand side of the formula, which is known as the _response variable_. In other words, it acts as if the _response variable_ is determined by a function of the _explanatory variables_. It then spots the linear function that best fits the data.
|
||||
|
||||
Linear models are straightforward to interpret. Incomes have a baseline mean of $`r coef(h)[1]`. Each one inch increase of height above zero is associated with an increase of $`r coef(h)[2]` in income.
|
||||
Linear models are straightforward to interpret. Incomes have a baseline mean of $`r coef(h)[1]`$. Each one inch increase of height above zero is associated with an increase of $`r coef(h)[2]`$ in income.
|
||||
|
||||
```{r}
|
||||
summary(h)
|
||||
|
|
Loading…
Reference in New Issue