R Under development (unstable) (2024-07-10 r86888 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(fitdistrplus) Loading required package: MASS Loading required package: survival > library(actuar) Attaching package: 'actuar' The following objects are masked from 'package:stats': sd, var The following object is masked from 'package:grDevices': cm > > set.seed(1234) > > n <- 1e3 > x <- rzmpois(n, 2, 1/2) > > fitdistrplus:::startarg_discrete_actuar_family(x, "zmpois") $p0 [1] 0.469 $lambda [1] 0.65844 > fitdist(x, "zmpois") Fitting of the distribution ' zmpois ' by maximum likelihood Parameters: estimate Std. Error p0 0.4690402 0.01578106 lambda 2.0281379 0.06920256 > > x <- rzmnbinom(n, 2, 1/2, 1/3) > fitdistrplus:::startarg_discrete_actuar_family(x, "zmnbinom") $p0 [1] 0.315 $size [1] 1.760338 $prob [1] 0.3390655 > fitdist(x, "zmnbinom") Fitting of the distribution ' zmnbinom ' by maximum likelihood Parameters: estimate Std. Error p0 0.3150028 0.01468924 size 2.5000134 0.53775110 prob 0.5521241 0.04573847 > > x <- rzmgeom(n, 1/2, 1/3) > fitdistrplus:::startarg_discrete_actuar_family(x, "zmgeom") $p0 [1] 0.336 $prob [1] 0.2867012 > fitdist(x, "zmgeom") Fitting of the distribution ' zmgeom ' by maximum likelihood Parameters: estimate Std. Error p0 0.3359667 0.01493584 prob 0.5045246 0.01378234 > > > x <- rzmbinom(n, 30, 1/2, 1/3) > > fitdistrplus:::startarg_discrete_actuar_family(x, "zmbinom") $p0 [1] 0.336 $size [1] 22 $prob [1] 0.664 > fitdist(x, "zmbinom", lower=0) Fitting of the distribution ' zmbinom ' by maximum likelihood Parameters: estimate p0 0.336000 size 22.000000 prob 0.684351 > > > x <- rpoisinvgauss(n, mean = 10, dispersion = 2) > > fitdistrplus:::startarg_discrete_actuar_family(x, "poisinvgauss") $mean [1] 0.371 $dispersion [1] 4.574434 > fitdist(x, "poisinvgauss", lower=0) Fitting of the distribution ' poisinvgauss ' by maximum likelihood Parameters: estimate Std. Error mean 11.248984 0.002924037 dispersion 1.897539 0.061510444 > > > proc.time() user system elapsed 1.75 0.28 2.01