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 > > data(groundbeef) > obs <- groundbeef$serving > > gammastart <- fitdistrplus:::startargdefault(obs, "gamma") > ll <- fitdistrplus:::manageparam(gammastart, list(rate = 0.5), obs, "gamma") > > fitdist(obs, "gamma", fix.arg = list(rate = 0.5)) Fitting of the distribution ' gamma ' by maximum likelihood Parameters: estimate Std. Error shape 32.83605 0.3568157 Fixed parameters: value rate 0.5 > fitdist(obs, "gamma", fix.arg = list(scale = 2)) Fitting of the distribution ' gamma ' by maximum likelihood Parameters: estimate Std. Error shape 32.83605 0.3568157 Fixed parameters: value scale 2 > > > pareto2start <- fitdistrplus:::startargdefault(obs, "pareto2") > ll <- fitdistrplus:::manageparam(pareto2start, list(rate = 0.5), obs, "pareto2") > > fitdist(obs, "pareto2", fix.arg = list(rate = 0.5), lower=0) Fitting of the distribution ' pareto2 ' by maximum likelihood Parameters: estimate Std. Error min 9.9999999 NaN shape 0.3019848 0.07920733 Fixed parameters: value rate 0.5 Warning messages: 1: In cov2cor(varcovar) : diag(V) had non-positive or NA entries; the non-finite result may be dubious 2: In sqrt(diag(varcovar)) : NaNs produced > fitdist(obs, "pareto2", fix.arg = list(scale = 2), lower=0) Fitting of the distribution ' pareto2 ' by maximum likelihood Parameters: estimate Std. Error min 9.9999999 NaN shape 0.3019848 0.07920733 Fixed parameters: value scale 2 Warning messages: 1: In cov2cor(varcovar) : diag(V) had non-positive or NA entries; the non-finite result may be dubious 2: In sqrt(diag(varcovar)) : NaNs produced > > proc.time() user system elapsed 1.62 0.34 1.95