Skip to contents

This function fits a variable (e.g., flow, snow, rain, etc) to a univariate distribution function, e.g. Weibull,Log-pearson type III, GEV, Normal and Lognormal distributions. It is up to the user to decide which distribution function to use and whether any pre-processing is necessary (outliers, mixed populations, etc).

Usage

btbr_batch_distribution(data, value, ...)

Arguments

data

A data.frame.

value

A numeric unquoted column.

...

Values to pass to fitdist

Value

A data.frame with return intervals and associated value for Weibull, Log-pearson type III, GEV, Normal and Lognormal distributions.

Examples

granitic_dist <- btbr_batch_distribution(data %>% dplyr::filter(geology == 'Granitic'),
                                         value = value_tons_mi2_yr,
                                         method = 'mge')
#> Error in data %>% dplyr::filter(geology == "Granitic"): could not find function "%>%"


sedimentary_dist <- btbr_batch_distribution(data %>% dplyr::filter(geology == 'Sedimentary'),
                                            value = value_tons_mi2_yr,
                                            method = 'mge')
#> Error in data %>% dplyr::filter(geology == "Sedimentary"): could not find function "%>%"