Statistical_fit: a dataframe containing the statistical fit criteria of the fitted distributions.
Dist_parameters: a dataframe containing the parameter value of the fitted distributions.
Arguments
df
a dataframe.
param
character. Name of variable of the dataframe on which to fit the distributions.
dist
character or vector of character. Determine which distribution to fit on the density plot.
Details
The available distributions are: "norm" (normal), "beta", "gamma", "lnorm" (lognormal). The arguments of the lists are "AIC" which contains the Akaike Information Criteria for each fitted distribution and "Dist_parameters" which contains the parameters of the fitted distributions. The distributions are fitted using the fitdistrplus::fitdist()
# Fitting normal and beta distribution to the "u_pfs" variable of the example dataframe.data(df_pa)
fit_dist(df = df_pa,
param = "u_pfs",
dist = c("norm", "beta"))