Skip to content

Instantly share code, notes, and snippets.

@alexhallam
Created March 20, 2018 10:34
Show Gist options
  • Save alexhallam/33d2f5296db9e4a9b34baa33aa56cae4 to your computer and use it in GitHub Desktop.
Save alexhallam/33d2f5296db9e4a9b34baa33aa56cae4 to your computer and use it in GitHub Desktop.
using the exgaus distribution to model response time
# https://link.springer.com/article/10.1057/jma.2014.3#Tab2
# using the exgaus distribution to model response time
library(tidyverse)
data.frame(x=c(0, 20)) %>%
ggplot(aes(x)) +
stat_function(fun=function(x) dexGAUS(x, mu=1, sigma=2, nu=3),
linetype = 1) +
stat_function(fun=function(x) dexGAUS(x, mu=4, sigma=0.04, nu=4),
linetype = 2) +
stat_function(fun=function(x) dexGAUS(x, mu=8, sigma=1, nu=0.5),
linetype = 3) +
theme_classic()
@alexhallam
Copy link
Author

alexhallam commented Mar 20, 2018

using the normalized lower incomplete gamma

library(tidyverse)
data.frame(x=c(0, 10)) %>% 
ggplot(aes(x)) + 
  stat_function(fun=function(x) pgamma(x, shape = 4, rate = 1),
                linetype = 1, size = 1) +
    stat_function(fun=function(x) pgamma(x, shape = 2, rate = 1/.8),
                linetype = 2, size = 1) +
    stat_function(fun=function(x) pgamma(x, shape = .5, rate = 1/4),
                linetype = 3, size = 1) +
theme_classic()

plot1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment