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 > nbboot <- 100 > nbboot <- 10 > nsample <- 10 > > # (1) Description of a sample from a normal distribution > # with and without uncertainty on skewness and kurtosis estimated by bootstrap > # > set.seed(1234) > x1 <- rnorm(nsample) > descdist(x1) summary statistics ------ min: -2.345698 max: 1.084441 median: -0.5555419 mean: -0.3831574 estimated sd: 0.9957875 estimated skewness: -0.503199 estimated kurtosis: 3.378593 > descdist(x1,boot=nbboot) summary statistics ------ min: -2.345698 max: 1.084441 median: -0.5555419 mean: -0.3831574 estimated sd: 0.9957875 estimated skewness: -0.503199 estimated kurtosis: 3.378593 > > # (2) Description of a sample from a beta distribution > # with uncertainty on skewness and kurtosis estimated by bootstrap > # with changing of default colors > # > descdist(rbeta(nsample,shape1=0.05,shape2=1),boot=nbboot, + obs.col="blue",boot.col="orange") summary statistics ------ min: 9.12833e-29 max: 0.9281344 median: 0.0001273965 mean: 0.1357514 estimated sd: 0.2918713 estimated skewness: 2.687994 estimated kurtosis: 10.58841 > > # (3) Description of a sample from a gamma distribution > # with uncertainty on skewness and kurtosis estimated by bootstrap > # without plotting > # > descdist(rgamma(nsample,shape=2,rate=1),boot=nbboot,graph=FALSE) summary statistics ------ min: 0.3436848 max: 6.465445 median: 1.423823 mean: 2.236649 estimated sd: 2.005999 estimated skewness: 1.228484 estimated kurtosis: 3.804473 > > # (3) Description of a sample from a Poisson distribution > # with uncertainty on skewness and kurtosis estimated by bootstrap > # > descdist(rpois(nsample,lambda=2),discrete=TRUE,boot=nbboot) summary statistics ------ min: 0 max: 4 median: 2 mean: 1.9 estimated sd: 1.449138 estimated skewness: 0.2135917 estimated kurtosis: 2.013066 > > # (4) Description of serving size data > # with uncertainty on skewness and kurtosis estimated by bootstrap > # > data(groundbeef) > serving <- groundbeef$serving > descdist(serving, boot=nbboot) summary statistics ------ min: 10 max: 200 median: 79 mean: 73.64567 estimated sd: 35.88487 estimated skewness: 0.7352745 estimated kurtosis: 3.551384 > > proc.time() user system elapsed 1.64 0.34 1.96