dist <- dist_inverse_gaussian(mean = c(1,1,1,3,3), shape = c(0.2, 1, 3, 0.2, 1))
dist
#> <distribution[5]>
#> [1] IG(1, 0.2) IG(1, 1) IG(1, 3) IG(3, 0.2) IG(3, 1)
mean(dist)
#> [1] 1 1 1 3 3
variance(dist)
#> [1] 5.0000000 1.0000000 0.3333333 135.0000000 27.0000000
support(dist)
#> <support_region[5]>
#> [1] (0,Inf) (0,Inf) (0,Inf) (0,Inf) (0,Inf)
generate(dist, 10)
#> [[1]]
#> [1] 5.15380957 0.20759199 0.22993718 0.15765369 0.08492653 0.32453118
#> [7] 0.04717116 0.52645047 0.30156623 0.04338407
#>
#> [[2]]
#> [1] 0.3290384 0.9544555 0.3455917 0.6770325 0.5435326 0.4595871 0.4483962
#> [8] 3.2227768 2.6449558 0.3617308
#>
#> [[3]]
#> [1] 0.8402396 1.1087727 1.0501997 0.7339707 0.4350072 1.1153719 0.3444099
#> [8] 0.4827854 0.4515277 1.1905139
#>
#> [[4]]
#> [1] 0.06335395 3.66853846 0.53560550 0.19240905 0.84941559 0.09855084
#> [7] 0.10023399 15.35925074 0.17602119 0.13196878
#>
#> [[5]]
#> [1] 3.7982055 0.8192391 0.2642808 0.4643462 0.7255619 1.7658420 4.5326504
#> [8] 1.1075956 1.0585305 1.0145446
#>
density(dist, 2)
#> [1] 0.06000195 0.10984782 0.11539974 0.06272885 0.13718333
density(dist, 2, log = TRUE)
#> [1] -2.813378 -2.208659 -2.159353 -2.768934 -1.986437
cdf(dist, 4)
#> [1] 0.9454196 0.9790764 0.9983186 0.8735512 0.8031695
quantile(dist, 0.7)
#> [1] 0.6758386 1.0851197 1.1505484 1.0143030 2.5216357