count: false .panel1-the_chunk-auto[ ``` r *palmerpenguins::penguins ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 344 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 3 Adelie Torgersen 40.3 18 195 3250 4 Adelie Torgersen NA NA NA NA 5 Adelie Torgersen 36.7 19.3 193 3450 6 Adelie Torgersen 39.3 20.6 190 3650 7 Adelie Torgersen 38.9 17.8 181 3625 8 Adelie Torgersen 39.2 19.6 195 4675 9 Adelie Torgersen 34.1 18.1 193 3475 10 Adelie Torgersen 42 20.2 190 4250 # ℹ 334 more rows # ℹ 2 more variables: sex <fct>, year <int> ``` ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% * head(2) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) *ggplot(palmerpenguins::penguins) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + * aes(y = flipper_length_mm, x = bill_depth_mm) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + * geom_point() ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + * aes(bill_depth_mm = bill_depth_mm) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + aes(bill_depth_mm = bill_depth_mm) + * geom_lm(alpha = .2) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + aes(bill_depth_mm = bill_depth_mm) + geom_lm(alpha = .2) + * geom_text(stat = StatLmGlance, size = 5) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + aes(bill_depth_mm = bill_depth_mm) + geom_lm(alpha = .2) + geom_text(stat = StatLmGlance, size = 5) + * stat_lm(geom = 'segment', alpha = .2) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_09_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + aes(bill_depth_mm = bill_depth_mm) + geom_lm(alpha = .2) + geom_text(stat = StatLmGlance, size = 5) + stat_lm(geom = 'segment', alpha = .2) + * aes(color = species) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_10_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + aes(bill_depth_mm = bill_depth_mm) + geom_lm(alpha = .2) + geom_text(stat = StatLmGlance, size = 5) + stat_lm(geom = 'segment', alpha = .2) + aes(color = species) + * aes(shape = sex) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_11_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + aes(bill_depth_mm = bill_depth_mm) + geom_lm(alpha = .2) + geom_text(stat = StatLmGlance, size = 5) + stat_lm(geom = 'segment', alpha = .2) + aes(color = species) + aes(shape = sex) + * aes(island = island) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_12_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + aes(bill_depth_mm = bill_depth_mm) + geom_lm(alpha = .2) + geom_text(stat = StatLmGlance, size = 5) + stat_lm(geom = 'segment', alpha = .2) + aes(color = species) + aes(shape = sex) + aes(island = island) + * aes(body_mass_g = body_mass_g) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_13_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r palmerpenguins::penguins %>% head(2) ggplot(palmerpenguins::penguins) + aes(y = flipper_length_mm, x = bill_depth_mm) + geom_point() + aes(bill_depth_mm = bill_depth_mm) + geom_lm(alpha = .2) + geom_text(stat = StatLmGlance, size = 5) + stat_lm(geom = 'segment', alpha = .2) + aes(color = species) + aes(shape = sex) + aes(island = island) + aes(body_mass_g = body_mass_g) ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 2 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Adelie Torgersen 39.1 18.7 181 3750 2 Adelie Torgersen 39.5 17.4 186 3800 # ℹ 2 more variables: sex <fct>, year <int> ``` ![](flipper_estimation_chunk_flipbook_files/figure-html/the_chunk_auto_14_output-1.png)<!-- --> ] <style> .panel1-the_chunk-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-the_chunk-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-the_chunk-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- ``` r return_model() ``` ``` Call: lm(formula = formula, data = lmdata) Residuals: Min 1Q Median 3Q Max -14.023 -3.380 -0.151 3.054 16.413 Coefficients: (1 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) 1.488e+02 6.396e+00 23.272 < 2e-16 *** body_mass_g 5.867e-03 9.516e-04 6.166 2.08e-09 *** islandDream 1.291e+00 1.066e+00 1.211 0.22687 islandTorgersen 2.683e+00 1.105e+00 2.428 0.01571 * shapemale 1.513e+00 9.216e-01 1.642 0.10152 colourChinstrap 5.552e+00 9.572e-01 5.801 1.57e-08 *** colourGentoo 2.351e+01 2.225e+00 10.565 < 2e-16 *** bill_depth_mm 9.492e-01 3.629e-01 2.616 0.00932 ** x NA NA NA NA --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.264 on 325 degrees of freedom Multiple R-squared: 0.8619, Adjusted R-squared: 0.8589 F-statistic: 289.8 on 7 and 325 DF, p-value: < 2.2e-16 ``` <style type="text/css"> .remark-code{line-height: 1.5; font-size: 70%} @media print { .has-continuation { display: block; } } code.r.hljs.remark-code{ position: relative; overflow-x: hidden; } code.r.hljs.remark-code:hover{ overflow-x:visible; width: 500px; border-style: solid; } </style>