class: inverse background-image: url(https://images.unsplash.com/photo-1572291720677-d8d28ac52a5b?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1556&q=80) background-size: cover # [{ggxmean}](https://github.com/EvaMaeRey/ggxmean) <br><br><br><br><br> <br><br><br><br><br> <br><br><br><br><br> <br><br><br><br><br> #### Photo credit: Hans Veth --- class: inverse, center, middle # viz the mean and conditional means --- count: false .panel1-vizthemean1d-user[ ```r *library(tidyverse) *library(ggxmean) *palmerpenguins::penguins %>% * drop_na() %>% * ggplot() + * aes(x = bill_length_mm) + * geom_rug(alpha = .3) + * geom_histogram(alpha = .4) ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + * geom_x_mean() ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + * aes(color = species) ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + * aes(fill = species) ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + aes(fill = species) + * facet_grid(rows = vars(species)) ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + aes(fill = species) + facet_grid(rows = vars(species)) + * facet_grid(rows = vars(species, sex)) ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + aes(fill = species) + facet_grid(rows = vars(species)) + facet_grid(rows = vars(species, sex)) + * geom_rug(alpha = .6) ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + aes(fill = species) + facet_grid(rows = vars(species)) + facet_grid(rows = vars(species, sex)) + geom_rug(alpha = .6) + * geom_x_quantile(quantile = .5, * linetype = "dashed") ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + aes(fill = species) + facet_grid(rows = vars(species)) + facet_grid(rows = vars(species, sex)) + geom_rug(alpha = .6) + geom_x_quantile(quantile = .5, linetype = "dashed") + * geom_x_percentile(percentile = 75, * color = "goldenrod") ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + aes(fill = species) + facet_grid(rows = vars(species)) + facet_grid(rows = vars(species, sex)) + geom_rug(alpha = .6) + geom_x_quantile(quantile = .5, linetype = "dashed") + geom_x_percentile(percentile = 75, color = "goldenrod") + * geom_x_median(color = "black") ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + aes(fill = species) + facet_grid(rows = vars(species)) + facet_grid(rows = vars(species, sex)) + geom_rug(alpha = .6) + geom_x_quantile(quantile = .5, linetype = "dashed") + geom_x_percentile(percentile = 75, color = "goldenrod") + geom_x_median(color = "black") + * geom_x_quantile(quantile = .25, linetype = "dashed") ``` ] .panel2-vizthemean1d-user[ <!-- --> ] --- count: false .panel1-vizthemean1d-user[ ```r library(tidyverse) library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + geom_rug(alpha = .3) + geom_histogram(alpha = .4) + geom_x_mean() + aes(color = species) + aes(fill = species) + facet_grid(rows = vars(species)) + facet_grid(rows = vars(species, sex)) + geom_rug(alpha = .6) + geom_x_quantile(quantile = .5, linetype = "dashed") + geom_x_percentile(percentile = 75, color = "goldenrod") + geom_x_median(color = "black") + geom_x_quantile(quantile = .25, linetype = "dashed") + * geom_boxplot(y = 0, * width = 3, * fill = "white", * color = "black") ``` ] .panel2-vizthemean1d-user[ <!-- --> ] <style> .panel1-vizthemean1d-user { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-vizthemean1d-user { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-vizthemean1d-user { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: inverse, center, middle # and the mean of y --- count: false .panel1-vizthemean2d-user[ ```r *library(ggxmean) *palmerpenguins::penguins %>% * drop_na() %>% * ggplot() + * aes(x = bill_length_mm) + * aes(y = flipper_length_mm) + * geom_point() ``` ] .panel2-vizthemean2d-user[ <!-- --> ] --- count: false .panel1-vizthemean2d-user[ ```r library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + * geom_x_mean() ``` ] .panel2-vizthemean2d-user[ <!-- --> ] --- count: false .panel1-vizthemean2d-user[ ```r library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + * geom_y_mean() ``` ] .panel2-vizthemean2d-user[ <!-- --> ] --- count: false .panel1-vizthemean2d-user[ ```r library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + * aes(color = species) ``` ] .panel2-vizthemean2d-user[ <!-- --> ] --- count: false .panel1-vizthemean2d-user[ ```r library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + aes(color = species) + * facet_wrap(facets = vars(species)) ``` ] .panel2-vizthemean2d-user[ <!-- --> ] --- count: false .panel1-vizthemean2d-user[ ```r library(ggxmean) palmerpenguins::penguins %>% drop_na() %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + aes(color = species) + facet_wrap(facets = vars(species)) + * facet_grid(cols = vars(species), * rows = vars(sex)) ``` ] .panel2-vizthemean2d-user[ <!-- --> ] <style> .panel1-vizthemean2d-user { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-vizthemean2d-user { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-vizthemean2d-user { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-ttest-auto[ ```r *set.seed(1456) ``` ] .panel2-ttest-auto[ ] --- count: false .panel1-ttest-auto[ ```r set.seed(1456) *ggplot(starwars %>% sample_n(30)) ``` ] .panel2-ttest-auto[ <!-- --> ] --- count: false .panel1-ttest-auto[ ```r set.seed(1456) ggplot(starwars %>% sample_n(30)) + * aes(x = height) ``` ] .panel2-ttest-auto[ <!-- --> ] --- count: false .panel1-ttest-auto[ ```r set.seed(1456) ggplot(starwars %>% sample_n(30)) + aes(x = height) + * geom_rug() ``` ] .panel2-ttest-auto[ <!-- --> ] --- count: false .panel1-ttest-auto[ ```r set.seed(1456) ggplot(starwars %>% sample_n(30)) + aes(x = height) + geom_rug() + * geom_dotplot() ``` ] .panel2-ttest-auto[ <!-- --> ] --- count: false .panel1-ttest-auto[ ```r set.seed(1456) ggplot(starwars %>% sample_n(30)) + aes(x = height) + geom_rug() + geom_dotplot() + * geom_x_mean(linetype = "dashed") ``` ] .panel2-ttest-auto[ <!-- --> ] --- count: false .panel1-ttest-auto[ ```r set.seed(1456) ggplot(starwars %>% sample_n(30)) + aes(x = height) + geom_rug() + geom_dotplot() + geom_x_mean(linetype = "dashed") + * ggxmean:::geom_tdist( * height = 50, * alpha = .5 * ) ``` ] .panel2-ttest-auto[ <!-- --> ] --- count: false .panel1-ttest-auto[ ```r set.seed(1456) ggplot(starwars %>% sample_n(30)) + aes(x = height) + geom_rug() + geom_dotplot() + geom_x_mean(linetype = "dashed") + ggxmean:::geom_tdist( height = 50, alpha = .5 ) + * ggxmean:::geom_ttestconf( * size = 2, * conf.level = .9, * y = -.05 * ) ``` ] .panel2-ttest-auto[ <!-- --> ] <style> .panel1-ttest-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-ttest-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-ttest-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] --- count: false .panel1-multittest-20[ ```r ggplot(tibble(height = runif(20))) + aes(x = height) + geom_rug() + geom_x_mean( linetype = "dashed", color = "mediumvioletred", size = 1.5 ) + ggxmean:::geom_tdist( height = 1, alpha = .5, fill = "mediumvioletred" ) + ggxmean:::geom_ttestconf( size = 2, color = "mediumvioletred", alpha = .75, y = -.01, conf.level = .90) + scale_x_continuous(limits = c(0, 1)) + scale_y_continuous(limits = c(0, 1.7)) ``` ] .panel2-multittest-20[ <!-- --> ] <style> .panel1-multittest-20 { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-multittest-20 { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-multittest-20 { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: inverse, center, middle # OLS --- count: false .panel1-ols-user[ ```r *palmerpenguins::penguins %>% * filter(species == "Chinstrap" & sex == "male") %>% * ggplot() + * aes(x = flipper_length_mm) + * aes(y = body_mass_g) + * geom_point() ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + * geom_lm() ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + * geom_rug(aes(y = NULL)) ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + * geom_x_line(alpha = .2, * linetype = "dotted") ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + * geom_lm_fitted(color = "blue", size = 2.5) ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + * geom_lm_residuals(color = "tomato3") ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + * geom_y_mean() ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + * geom_x_mean() ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + * geom_xy_means(size = 3, color = "lightpink4") ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + * geom_lm_formula() ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x * annotate(geom = "point", * x = 208, * y = 40.3 * 208 - 4110, * size = 5, * shape = "diamond") ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x annotate(geom = "point", x = 208, y = 40.3 * 208 - 4110, size = 5, shape = "diamond") + * ggxmean:::geom_lm_run(color = "violetred4") ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x annotate(geom = "point", x = 208, y = 40.3 * 208 - 4110, size = 5, shape = "diamond") + ggxmean:::geom_lm_run(color = "violetred4") + * ggxmean:::geom_lm_rise(color = "violetred4") ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x annotate(geom = "point", x = 208, y = 40.3 * 208 - 4110, size = 5, shape = "diamond") + ggxmean:::geom_lm_run(color = "violetred4") + ggxmean:::geom_lm_rise(color = "violetred4") + * ggxmean:::geom_lm_run10(color = "chartreuse3") ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x annotate(geom = "point", x = 208, y = 40.3 * 208 - 4110, size = 5, shape = "diamond") + ggxmean:::geom_lm_run(color = "violetred4") + ggxmean:::geom_lm_rise(color = "violetred4") + ggxmean:::geom_lm_run10(color = "chartreuse3") + * ggxmean:::geom_lm_rise10(color = "chartreuse3") ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x annotate(geom = "point", x = 208, y = 40.3 * 208 - 4110, size = 5, shape = "diamond") + ggxmean:::geom_lm_run(color = "violetred4") + ggxmean:::geom_lm_rise(color = "violetred4") + ggxmean:::geom_lm_run10(color = "chartreuse3") + ggxmean:::geom_lm_rise10(color = "chartreuse3") + * ggxmean:::geom_lm_predictx(alpha = .2) ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x annotate(geom = "point", x = 208, y = 40.3 * 208 - 4110, size = 5, shape = "diamond") + ggxmean:::geom_lm_run(color = "violetred4") + ggxmean:::geom_lm_rise(color = "violetred4") + ggxmean:::geom_lm_run10(color = "chartreuse3") + ggxmean:::geom_lm_rise10(color = "chartreuse3") + ggxmean:::geom_lm_predictx(alpha = .2) + * ggxmean:::geom_lm_predicty(alpha = .2) ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x annotate(geom = "point", x = 208, y = 40.3 * 208 - 4110, size = 5, shape = "diamond") + ggxmean:::geom_lm_run(color = "violetred4") + ggxmean:::geom_lm_rise(color = "violetred4") + ggxmean:::geom_lm_run10(color = "chartreuse3") + ggxmean:::geom_lm_rise10(color = "chartreuse3") + ggxmean:::geom_lm_predictx(alpha = .2) + ggxmean:::geom_lm_predicty(alpha = .2) + * ggxmean:::geom_lm_intercept() ``` ] .panel2-ols-user[ <!-- --> ] --- count: false .panel1-ols-user[ ```r palmerpenguins::penguins %>% filter(species == "Chinstrap" & sex == "male") %>% ggplot() + aes(x = flipper_length_mm) + aes(y = body_mass_g) + geom_point() + geom_lm() + geom_rug(aes(y = NULL)) + geom_x_line(alpha = .2, linetype = "dotted") + geom_lm_fitted(color = "blue", size = 2.5) + geom_lm_residuals(color = "tomato3") + geom_y_mean() + geom_x_mean() + geom_xy_means(size = 3, color = "lightpink4") + geom_lm_formula() + # plug and chug to calculate an # expected value of y for a given x annotate(geom = "point", x = 208, y = 40.3 * 208 - 4110, size = 5, shape = "diamond") + ggxmean:::geom_lm_run(color = "violetred4") + ggxmean:::geom_lm_rise(color = "violetred4") + ggxmean:::geom_lm_run10(color = "chartreuse3") + ggxmean:::geom_lm_rise10(color = "chartreuse3") + ggxmean:::geom_lm_predictx(alpha = .2) + ggxmean:::geom_lm_predicty(alpha = .2) + ggxmean:::geom_lm_intercept() + * ggxmean:::geom_lm_interceptcoords(hjust = 0) ``` ] .panel2-ols-user[ <!-- --> ] <style> .panel1-ols-user { color: black; width: 49%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-ols-user { color: black; width: 49%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-ols-user { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: inverse # Correlation -- # Don't worry about the overall importance of the problem; -- work on it if it looks interesting. -- I think there's a sufficient correlation between interest and importance. -- - David Blackwell --- count: false .panel1-vizthecorrelation-user[ ```r *library(ggxmean) *palmerpenguins::penguins %>% * mutate(id = row_number()) %>% * ggplot() + * aes(x = bill_length_mm) + * aes(y = flipper_length_mm) + * geom_point() + * geom_x_mean() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + * geom_y_mean() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + * geom_y_line(alpha = .02) ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + * geom_x_line(alpha = .02) ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + * ggxmean:::geom_xdiff() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + * ggxmean:::geom_ydiff() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + ggxmean:::geom_ydiff() + * ggxmean:::geom_diffsmultiplied() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + ggxmean:::geom_ydiff() + ggxmean:::geom_diffsmultiplied() + * ggxmean:::geom_x1sd() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + ggxmean:::geom_ydiff() + ggxmean:::geom_diffsmultiplied() + ggxmean:::geom_x1sd() + * ggxmean:::geom_y1sd() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + ggxmean:::geom_ydiff() + ggxmean:::geom_diffsmultiplied() + ggxmean:::geom_x1sd() + ggxmean:::geom_y1sd() + * ggxmean:::geom_rsq1(fill = "blue") ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + ggxmean:::geom_ydiff() + ggxmean:::geom_diffsmultiplied() + ggxmean:::geom_x1sd() + ggxmean:::geom_y1sd() + ggxmean:::geom_rsq1(fill = "blue") + * ggxmean:::geom_xy1sd(fill = "green") ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + ggxmean:::geom_ydiff() + ggxmean:::geom_diffsmultiplied() + ggxmean:::geom_x1sd() + ggxmean:::geom_y1sd() + ggxmean:::geom_rsq1(fill = "blue") + ggxmean:::geom_xy1sd(fill = "green") + * ggxmean:::geom_xydiffsmean(alpha = 1, * fill = "plum3") + * ggxmean:::geom_corrlabel() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + ggxmean:::geom_ydiff() + ggxmean:::geom_diffsmultiplied() + ggxmean:::geom_x1sd() + ggxmean:::geom_y1sd() + ggxmean:::geom_rsq1(fill = "blue") + ggxmean:::geom_xy1sd(fill = "green") + ggxmean:::geom_xydiffsmean(alpha = 1, fill = "plum3") + ggxmean:::geom_corrlabel() + * geom_lm() ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] --- count: false .panel1-vizthecorrelation-user[ ```r library(ggxmean) palmerpenguins::penguins %>% mutate(id = row_number()) %>% ggplot() + aes(x = bill_length_mm) + aes(y = flipper_length_mm) + geom_point() + geom_x_mean() + geom_y_mean() + geom_y_line(alpha = .02) + geom_x_line(alpha = .02) + ggxmean:::geom_xdiff() + ggxmean:::geom_ydiff() + ggxmean:::geom_diffsmultiplied() + ggxmean:::geom_x1sd() + ggxmean:::geom_y1sd() + ggxmean:::geom_rsq1(fill = "blue") + ggxmean:::geom_xy1sd(fill = "green") + ggxmean:::geom_xydiffsmean(alpha = 1, fill = "plum3") + ggxmean:::geom_corrlabel() + geom_lm() + * facet_wrap(facet = vars(species)) ``` ] .panel2-vizthecorrelation-user[ <!-- --> ] <style> .panel1-vizthecorrelation-user { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-vizthecorrelation-user { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-vizthecorrelation-user { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-suprising-auto[ ```r *cars ``` ] .panel2-suprising-auto[ ``` speed dist 1 4 2 2 4 10 3 7 4 4 7 22 5 8 16 6 9 10 7 10 18 8 10 26 9 10 34 10 11 17 11 11 28 12 12 14 13 12 20 14 12 24 15 12 28 16 13 26 17 13 34 18 13 34 19 13 46 20 14 26 21 14 36 22 14 60 23 14 80 24 15 20 25 15 26 26 15 54 27 16 32 28 16 40 29 17 32 30 17 40 31 17 50 32 18 42 33 18 56 34 18 76 35 18 84 36 19 36 37 19 46 38 19 68 39 20 32 40 20 48 41 20 52 42 20 56 43 20 64 44 22 66 45 23 54 46 24 70 47 24 92 48 24 93 49 24 120 50 25 85 ``` ] --- count: false .panel1-suprising-auto[ ```r cars %>% * ggplot() ``` ] .panel2-suprising-auto[ <!-- --> ] --- count: false .panel1-suprising-auto[ ```r cars %>% ggplot() + * aes(x = speed) ``` ] .panel2-suprising-auto[ <!-- --> ] --- count: false .panel1-suprising-auto[ ```r cars %>% ggplot() + aes(x = speed) + * geom_rug() ``` ] .panel2-suprising-auto[ <!-- --> ] --- count: false .panel1-suprising-auto[ ```r cars %>% ggplot() + aes(x = speed) + geom_rug() + * geom_x_mean() ``` ] .panel2-suprising-auto[ <!-- --> ] --- count: false .panel1-suprising-auto[ ```r cars %>% ggplot() + aes(x = speed) + geom_rug() + geom_x_mean() + * geom_x_mean_label() ``` ] .panel2-suprising-auto[ <!-- --> ] --- count: false .panel1-suprising-auto[ ```r cars %>% ggplot() + aes(x = speed) + geom_rug() + geom_x_mean() + geom_x_mean_label() + * aes(y = dist) ``` ] .panel2-suprising-auto[ <!-- --> ] --- count: false .panel1-suprising-auto[ ```r cars %>% ggplot() + aes(x = speed) + geom_rug() + geom_x_mean() + geom_x_mean_label() + aes(y = dist) + * geom_y_mean() ``` ] .panel2-suprising-auto[ <!-- --> ] --- count: false .panel1-suprising-auto[ ```r cars %>% ggplot() + aes(x = speed) + geom_rug() + geom_x_mean() + geom_x_mean_label() + aes(y = dist) + geom_y_mean() + * geom_y_mean_label() ``` ] .panel2-suprising-auto[ <!-- --> ] --- count: false .panel1-suprising-auto[ ```r cars %>% ggplot() + aes(x = speed) + geom_rug() + geom_x_mean() + geom_x_mean_label() + aes(y = dist) + geom_y_mean() + geom_y_mean_label() + * geom_point() ``` ] .panel2-suprising-auto[ <!-- --> ] <style> .panel1-suprising-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-suprising-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-suprising-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 80%} @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>