add_fitted_dist.Rd
This function fits a specified distribution to the data in a given data frame and adds the fitted distribution as a new column.
add_fitted_dist(cost_df, dist)
A data frame containing the data to which the distribution will be fitted. The data frame should have columns named "mean", "lb_95", and "ub_95".
A character string specifying the distribution to fit. The distribution should be one of the distributions supported by the q
function in R (e.g., "norm" for normal distribution, "tri" for triangular distribution).
A data frame with an additional column named fitt_dist
containing the fitted distribution for each row.
if (FALSE) { # \dontrun{
cost_df <- data.frame(mean = c(10, 20), lb_95 = c(5, 15), ub_95 = c(15, 25))
add_fitted_dist(cost_df, "norm")
} # }