Skip to content

Commit

Permalink
Update 23-statistics.Rmd Regression with a categorical IV (the t-test)
Browse files Browse the repository at this point in the history
  • Loading branch information
quirksahern authored Aug 7, 2024
1 parent 8d3a957 commit 333d018
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions episodes/23-statistics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -335,18 +335,18 @@ summary(modelone)
Run the following code chunk and compare the results to the t test conducted earlier.

```{r}
gapminder %>%
mutate(european = factor(european))
lon_dims_imd_2019 %>%
mutate(city = factor(city))
modelttest <- lm(gapminder$pop ~ gapminder$european)
modelttest <- lm(lon_dims_imd_2019$health_london_rank ~ lon_dims_imd_2019$city)
summary(modelttest)
```

## Regression with a categorical IV (ANOVA)

Use the `lm()` function to model the relationship between `gapminder$gdpGroup`
and `gapminder$pop`. Compare the results with the ANOVA carried out earlier.
Use the `lm()` function to model the relationship between `lon_dims_imd_2019$la19nm`
and `lon_dims_imd_2019$health_london_rank`. Compare the results with the ANOVA carried out earlier.

## Break

Expand Down

0 comments on commit 333d018

Please sign in to comment.