library("gamlss2")
## simulate count data using the Poisson distribution
set.seed(111)
y <- rpois(1000, lambda = 10)
## create a discretized family using the BCT distribution (with log link for mu)
fam <- discretize(family = BCT(mu.link = "log"))
## fit a count regression model using the discretized family
fit_family(y, family = fam)GAMLSS-RS iteration 1: Global Deviance = 5169.4544 eps = 0.508090
GAMLSS-RS iteration 2: Global Deviance = 5123.1813 eps = 0.008951
GAMLSS-RS iteration 3: Global Deviance = 5121.12 eps = 0.000402
GAMLSS-RS iteration 4: Global Deviance = 5120.9807 eps = 0.000027
GAMLSS-RS iteration 5: Global Deviance = 5120.9196 eps = 0.000011
GAMLSS-RS iteration 6: Global Deviance = 5120.8865 eps = 0.000006
