# show.R # # Draws plots of the experimental distributions stored in csv files in the current working directory # together with the theoretical probability distribution. # # TODO: pareto_shifted distribution # # Author: Tomi ############################################################################### dundefined <- function(x, ...) { 0.0 } # redefine some distribution so they accept the same parameters as in the csv file dbernoulli_ <- function(x, p) { dbinom(x, 1, p) } derlang_ <- function(x, k, mean) { dgamma(x, k, scale=mean/k) } dexp_ <- function(x, mean) { dexp(x, 1/mean) } dgamma_ <- function(x, shape, scale) { dgamma(x, shape, scale=scale) } dintunif_ <- function(x, min, max) { if (is.na(x) | xmax) 0.0 else 1/(max-min+1) } dpareto_ <- function(x, a, b, c) { a/b*(b/(x+c))^(a+1) } dtruncnorm_ <- function(x, mean, sd) { if (is.na(x) | x<0) 0.0 else dnorm(x, mean, sd)/(1-pnorm(0,mean,sd)) } dtriang_ <- function (x, a, b, c) { if (is.na(x) | xc) 0.0 else if (x for the next plot.") }