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] 0.04227191 0.19601420 0.23329668 0.09094846 0.62843904 0.50557289
#> [7] 0.28761792 0.12133632 0.86465060 0.16754419
#>
#> [[2]]
#> [1] 1.0188343 0.5125072 0.7771671 0.2059549 0.7690808 0.4120560 1.0887066
#> [8] 2.0213348 0.2256827 0.5860456
#>
#> [[3]]
#> [1] 1.2560806 0.9091823 0.6902123 1.4112989 0.9633707 1.1544308 1.0501992
#> [8] 0.8056128 1.2570774 0.8796442
#>
#> [[4]]
#> [1] 0.33881030 0.21306715 0.61126562 0.42564912 1.28640153 0.10299305
#> [7] 0.06287184 0.09817233 0.56072636 1.69831647
#>
#> [[5]]
#> [1] 0.5600728 6.0743261 2.2307192 0.9719879 0.5402180 1.9525628 8.8908486
#> [8] 3.0452730 0.8293036 1.3319336
#>
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