library(tidyverse)
#> -- Attaching packages ------------------------------------------------------------------------------------------------------- tidyverse 1.2.1 --
#> v ggplot2 3.1.0     v purrr   0.2.5
#> v tibble  1.4.2     v dplyr   0.7.7
#> v tidyr   0.8.2     v stringr 1.3.1
#> v readr   1.1.1     v forcats 0.3.0
#> -- Conflicts ---------------------------------------------------------------------------------------------------------- tidyverse_conflicts() --
#> x dplyr::filter() masks stats::filter()
#> x dplyr::lag()    masks stats::lag()
library(ggplot2)

This is a dataset i’ve been playing with as I learn beta regression

data("GasolineYield", package = "betareg")
GasolineYield <- as_tibble(GasolineYield)
GasolineYield
#> # A tibble: 32 x 6
#>    yield gravity pressure temp10  temp batch
#>  * <dbl>   <dbl>    <dbl>  <dbl> <dbl> <fct>
#>  1 0.122    50.8      8.6    190   205 1    
#>  2 0.223    50.8      8.6    190   275 1    
#>  3 0.347    50.8      8.6    190   345 1    
#>  4 0.457    50.8      8.6    190   407 1    
#>  5 0.08     40.8      3.5    210   218 2    
#>  6 0.131    40.8      3.5    210   273 2    
#>  7 0.266    40.8      3.5    210   347 2    
#>  8 0.074    40        6.1    217   212 3    
#>  9 0.182    40        6.1    217   272 3    
#> 10 0.304    40        6.1    217   340 3    
#> # ... with 22 more rows

GasolineYield %>%
  ggplot() +
  aes(x = temp, y = yield, color = factor(batch)) +
  geom_point(size = 3) +
  labs(color = "batch")

This is a dataset of eyetracking data with the proportions of looks to a named image over time. It’s a good example of where a nonlinear model would be useful.

data("ci", package = "bdots")
ci <- as_tibble(ci)
ci
#> # A tibble: 108,216 x 5
#>    protocol Subject  Time Fixations LookType
#>    <fct>      <int> <int>     <dbl> <fct>   
#>  1 NH            36     0         0 Cohort  
#>  2 NH            36     4         0 Cohort  
#>  3 NH            36     8         0 Cohort  
#>  4 NH            36    12         0 Cohort  
#>  5 NH            36    16         0 Cohort  
#>  6 NH            36    20         0 Cohort  
#>  7 NH            36    24         0 Cohort  
#>  8 NH            36    28         0 Cohort  
#>  9 NH            36    32         0 Cohort  
#> 10 NH            36    36         0 Cohort  
#> # ... with 108,206 more rows

ci %>%
  filter(LookType == "Target") %>%
  ggplot() +
    aes(x = Time, y = Fixations) +
    geom_line(aes(group = Subject)) +
    facet_wrap("protocol")