hydromad.object {hydromad}R Documentation

Standard methods for Hydromad model objects


A hydromad object represents a model, which may be fully specified (calibrated) or be defined only by parameter ranges. The model specification and parameter values are stored along with the observed input and output time-series data.


## S3 method for class 'hydromad'
update(object, ..., newdata, newpars,
       sma, routing, rfit, warmup,
       feasible.set, feasible.scores, glue.quantiles, and.rescale)

## S3 method for class 'hydromad'
fitted(object, ..., U = FALSE,
       all = FALSE, feasible.bounds = FALSE)

## S3 method for class 'hydromad'
observed(object, ..., select = "Q", all = FALSE)

## S3 method for class 'hydromad'
residuals(object, ..., all = FALSE,
          boxcox = FALSE, start = NULL)

## S3 method for class 'hydromad'
coef(object, which = c("both", "sma", "routing"),
     ..., feasible.set = FALSE, etc = FALSE, warn = TRUE)

## S3 method for class 'hydromad'
vcov(object, ...)

isValidModel(object, ...)



an object of class hydromad.


In the update method, parameter values or ranges for the SMA and/or routing simulation functions can be given, as with the hydromad() function.


a ts-like object containing a new time series dataset (replacing the original DATA argument given to the hydromad function).


a named list or vector of parameter values; this is equivalent to specifying the same values as named arguments (as in “...”).

sma, routing, rfit, warmup

same arguments as for the hydromad function. The update method allows these to be changed on an existing model object.

feasible.set, feasible.scores, glue.quantiles

the feasible set of parameter sets can be specified as a matrix, where parameter values are given in named columns. The corresponding objective function values for each row can be given as feasible.scores. If glue.quantiles is omitted or NULL, then overall bounds of the ensemble simulation will be calculated. Otherwise GLUE-like quantiles can be given as glue.quantiles. See defineFeasibleSet.


set to FALSE to suppress any automatic adjustment of parameters for mass balance.


selects either the SMA or routing model, or both models (the default).


if TRUE, return the entire time series for which data exists. Otherwise, the warmup period (specified as an argument to hydromad or update) is stripped off.


if TRUE, then ensemble simulation bounds are extracted and returned. This only works if a feasible set has been specified using defineFeasibleSet or the update method. Note that the meaning depends on what value of glue.quantiles was specified to those methods: it might be the overall simulation bounds, or some GLUE-like quantile values. This will be indicated by the returned column names.


to return modelled effective rainfall (the output from SMA) rather than streamflow.


data series to extract (from the original DATA argument). Use TRUE to extract all columns.


by default, coef gives a warning if the model parameters are not fully specifed (i.e. some parameters have ranges rather than specific values), because it returns a list rather than a vector in this case. Setting warn = FALSE skips the warning.


by default, coef returns only the model parameters, which are defined as being numeric and not wrapped in I(). If etc = TRUE is given, then all arguments for the simulation function(s) will be returned, which may include other data types like logicals or time series. In this case the return value is always a list.


Several standard methods are available for hydromad objects:

(note: these are links to the generic functions only)

update, predict, fitted, observed, residuals, coef, vcov, etc.

The summary and predict methods are documented on different pages.

The main plot methods are xyplot.hydromad and qqmath.hydromad.

isValidModel() returns TRUE only if the supplied hydromad object is fully specified and has a calculated output series.


update returns a new hydromad object.

fitted, observed and residuals returns time series.

coef returns a named numeric vector, or a named list if one or more parameters are not fully specified.


Felix Andrews felix@nfrac.org

See Also

hydromad, summary.hydromad, predict.hydromad, xyplot.hydromad, runlist

[Package hydromad version 0.9-18 Index]