Skip to contents

A weighted mixture of two or three component distributions, for records generated by more than one flood mechanism. Optionally zero-inflated.

Usage

model_mixture(
  families,
  data,
  zero_inflated = FALSE,
  parameters = NULL,
  parameter_values = NULL,
  use_default_flat_priors = NULL
)

Arguments

families

character vector of component distribution family names.

data

a numeric vector of observations, or an analysis_data() frame.

zero_inflated

logical; add a zero-inflation component.

parameters

optional model_parameter() object or list of them, setting bounds, fixed flags, priors, or starting values.

parameter_values

optional numeric vector of all parameter values, applied last.

use_default_flat_priors

logical; set FALSE alongside a custom prior.

Value

An object of class corehydro_model.

See also

Examples

x <- c(520, 580, 610, 700, 760, 850, 950, 5000, 5400, 5800, 6300, 6800)
model_mixture(c("Normal", "Normal"), x)
#> <corehydro_model> mixture: Normal + Normal
#>   data: 12 exact observations