Skip to contents

A hydraulically-controlled stage-discharge relationship of one to three segments, with a log10-space normal residual likelihood.

Usage

model_rating_curve(
  stage,
  discharge,
  segments = 1L,
  parameters = NULL,
  parameter_values = NULL,
  use_default_flat_priors = NULL
)

Arguments

stage

numeric vector of stage observations.

discharge

numeric vector of discharge observations, aligned with stage.

segments

number of hydraulic control segments (1 to 3).

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.

Examples

stage <- c(1.0, 1.4, 1.9, 2.3, 2.8, 3.2, 3.7, 4.1, 4.6, 5.0, 5.5, 6.0)
discharge <- c(12, 28, 61, 98, 158, 214, 302, 379, 490, 587, 723, 872)
model_rating_curve(stage, discharge, segments = 1)
#> <corehydro_model> rating_curve