event.xyplot.hydromad {hydromad} | R Documentation |
Visualise systematic model errors against covariates.
## S3 method for class 'hydromad.runlist': ## S3 method for class 'hydromad' event.xyplot(x, events, formula = ~ log2(e(Q,mean)+.01) + log2(e(lag(Q,-2),first)+.01) + log2(e(U,max)+.01) + e(E,mean), extract = residuals, with.U = TRUE, ..., panel = panel.superpose, panel.groups = function(x, y, ...) { panel.xyplot(x, y, ...) library(mgcv) panel.smoother(x, y, y ~ s(x), method = "gam", ...) }, abline = list(h = 0), pch = ".", ylab = "residual flow sums in event windows (mm)", data = NULL)
x |
a |
events |
event sequence produced by |
formula |
formula defining the covariates to plot, as passed to the formula
method of |
extract |
a function to apply to |
with.U |
to include modelled effective rainfall |
... |
further arguments passed to |
panel, panel.groups, abline, pch, ylab |
passed to |
data |
ignored. |
this function returns a trellis object which can be plot
ted.
Felix Andrews felix@nfrac.org
event.xyplot
,
xyplot
,
eventapply
data(Cotter) x <- Cotter[1:1000,] mod <- hydromad(x, sma = "scalar", routing = "armax", rfit = list("sriv", order = c(2,1))) ev <- eventseq(x$P, thresh = 3, inthresh = 1, indur = 5) event.xyplot(mod, events = ev) event.xyplot(mod, events = ev, extract = function(x) residuals(x, boxcox = TRUE)) foo <- event.xyplot(mod, events = ev, ~ sqrt(e(P,max)) + sqrt(e(rollmean(lag(P,-1),20,align="left"),first))) dimnames(foo)[[1]] <- c("sqrt. peak rain (mm/day)", "mean 20-day ante. rain") foo