predict.plm0 | R Documentation |
Predict the discharge for given stage values based on a discharge rating curve model object.
## S3 method for class 'plm0'
predict(object, ..., newdata = NULL, wide = FALSE)
## S3 method for class 'plm'
predict(object, ..., newdata = NULL, wide = FALSE)
## S3 method for class 'gplm0'
predict(object, ..., newdata = NULL, wide = FALSE)
## S3 method for class 'gplm'
predict(object, ..., newdata = NULL, wide = FALSE)
object |
an object of class "plm0", "plm", "gplm0" or "gplm". |
... |
not used in this function |
newdata |
a numeric vector of stage values for which to predict. If omitted, the stage values in the data are used. |
wide |
a logical value denoting whether to produce a wide prediction output.If TRUE, then the output is a table with median prediction values for an equally spaced grid of stages with 1 cm increments, each row containing predictions in a decimeter range of stages. |
an object of class "data.frame" with four columns, h (stage), lower (2.5% posterior predictive quantile), median (50% posterior predictive quantile), upper (97.5% posterior predictive quantile). If wide=TRUE, a matrix as described above (see wide parameter) is returned.
predict(plm0)
: Predict method for plm0
predict(plm)
: Predict method for plm
predict(gplm0)
: Predict method for gplm0
predict(gplm)
: Predict method for gplm
plm0
, plm
, gplm0
and gplm
for fitting a discharge rating curve and summary.plm0
, summary.plm
, summary.gplm0
and summary.gplm
for summaries. It is also useful to look at plot.plm0
, plot.plm
, plot.gplm0
and plot.gplm
to help visualize all aspects of the fitted discharge rating curve. Additionally, spread_draws
and spread_draws
help working directly with the MCMC samples.
data(krokfors)
set.seed(1)
plm0.fit <- plm0(formula=Q~W,data=krokfors,h_max=10,num_cores=2)
#predict rating curve on a equally 10 cm spaced grid from 9 to 10 meters
predict(plm0.fit,newdata=seq(9,10,by=0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.