dist_inverse_gaussian(mean, shape)
parameters. Must be strictly positive. Infinite values are supported.
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.08521799 3.73012531 2.13477094 2.20278520 1.98102368 0.08784623
#> [7] 0.73426225 0.40658271 0.48480729 0.48116933
#>
#> [[2]]
#> [1] 0.2574154 0.2411909 0.5589011 1.4275833 0.5798913 2.4992239 1.9785078
#> [8] 0.2068008 0.2767815 2.5596449
#>
#> [[3]]
#> [1] 1.2391828 0.4647065 0.8456562 1.3383376 1.0031189 0.3179647 0.3939565
#> [8] 1.5309328 0.4725051 1.1274341
#>
#> [[4]]
#> [1] 1.73965468 22.42693111 0.11704777 0.63878242 0.32595246 0.04922301
#> [7] 0.04472204 0.25405708 0.31735052 0.10265415
#>
#> [[5]]
#> [1] 2.0907457 1.7617280 1.1167235 0.5318730 2.6802852 0.7065199 3.0985368
#> [8] 0.9788524 1.9429910 0.2704159
#>
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