ch.6 (https://socviz.co/modeling.html)
6.5.1 Get component-level statistics with tidy()
text p.147の呪文
out_comp <- tidy(out)
out_comp %>% round_df()
とすると
Error in round_df(.) : could not find function "round_df"
と怒られました。
round_dfって何ですか?とググってみますと以下がヒット。
これはforestmangrというパッケージに入っているようです。なのでこいつをインストールします。
> install.packages("forestmangr")
>library(forestmangr)
それでやっと
> out_comp <- tidy(out)
> out_comp %>% round_df()
# A tibble: 7 x 5
term estimate std.error statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl>
1 (Intercept) 48 0 141 0
2 gdpPercap 0 0 19 0
3 pop 0 0 3 0
4 continentAmericas 13 1 22 0
5 continentAsia 8 1 14 0
6 continentEurope 17 1 28 0
7 continentOceania 18 2 10 0
できたー。