model_univariate
model_univariate(
family,
data,
trends=None,
parameters=None,
parameter_values=None,
use_default_flat_priors=None,
)A single distribution fit to a record.
Optionally censored (via :class:~corehydropy.data.AnalysisData) and optionally nonstationary (via :func:trend). This is the workhorse model behind :func:~corehydropy.univariate_analysis.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| family | str | Distribution family name; see :func:~corehydropy.distribution_names. |
required |
| data | AnalysisData or array_like | Observations, or a frame carrying censored observations. | required |
| trends | Trend or sequence of Trend | Makes the model nonstationary. | None |
| parameters | ModelParameter or sequence of ModelParameter | Bounds, fixed flags, priors, or starting values. | None |
| parameter_values | array_like | All parameter values, applied last. | None |
| use_default_flat_priors | bool | Set False alongside a custom prior. |
None |
Returns
| Name | Type | Description |
|---|---|---|
| Model | The assembled model spec. |
Examples
>>> peaks = [12500, 15300, 8900, 22100, 18700, 14200, 9800, 28500, 17400, 11600]
>>> model_univariate("LogPearsonTypeIII", peaks)
<Model univariate_distribution: LogPearsonTypeIII (10 exact)>
>>> model_univariate("Normal", peaks, trends=trend("mean", "Linear"))
<Model univariate_distribution: Normal (10 exact; 1 trends)>