View source: R/predict.move.1.R
predict.move.1 | R Documentation |
Predicts new values from a maintenance of variance extension, type 1 (MOVE.1) model fit.
## S3 method for class 'move.1' predict(object, newdata, type = c("response", "link"), var.fit = FALSE, ...)
object |
an object of class "move.1" on which to base the predicted values. |
newdata |
an optional data.frame in which to look for variables with which to predict. If omitted, then the fitted values are used. |
type |
the type of prediction ("response" or "link"). See Details. |
var.fit |
logical if |
... |
not used, required for method function. |
If type
is "response," then the predicted values are
back-transformed. Otherwise, the predicted values are computed directly from
the model equation.
If var.fit
is FALSE
, then a vector of predictions matching
newdata
or the model data. If var.fit
is TRUE
, then a data frame
containing the columns:
fit |
the predicted values |
var.fit |
the variance of the predicted values |
Lorenz, D.L., 2015, smwrStats-an R package for analyzing hydrologic data, version 0.7.0: U.S. Geological Survey Open-File Report 2015-XXXX, XX p.
move.1
, jackknifeMove.1
library(smwrData) data(IonBalance) # Build model for non missing Alkalinity IB.move <- move.1(Anion_sum ~ Cation_sum, data=IonBalance, subset=abs(Pct_Diff) < 10) print(IB.move) # Predict Anion_sum for missing Alkalinity predict(IB.move, IonBalance[1, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.