resnorm {WRTDStidal} | R Documentation |
Get salinity/flow normalized WRTDS predictions from interpolation grids
Description
Get normalized model predictions from WRTDS to remove the effect of salinity/flow on the response variable. Predicted values in the interpolation grids are averaged across dates.
Usage
resnorm(dat_in, ...)
## S3 method for class 'tidal'
resnorm(dat_in, trace = TRUE, ...)
## S3 method for class 'tidalmean'
resnorm(dat_in, trace = TRUE, ...)
Arguments
dat_in |
input tidal or tidalmean object |
... |
arguments passed to or from other methods |
trace |
logical indicating if progress is shown in the console |
Details
This function is used after wrtds
to normalize predicted values of the response variable from the interpolation grid for each model. The normalized values are based on the average of all predicted estimates across the range of salinity/flow values that have occurred on the same date throughout each year. For example, normalized values for July 2000 are the mean predicted response at that date using the observed salinity/flow values that occur in July of all years. The normalized values allow an interpretation of trends in the response variable that are independent of changes in salinity or freshwater inputs.
Value
Appends columns to the data.frame for normalized values. For, tidal objects, columns are named starting with the prefix ‘norm’, e.g., ‘norm0.5’ are the normalized values for the fit through the median. For tidalmean objects, columns are appended for the log-transformed and back-transformed normalized values, named ‘norm’ and ‘bt_norm’.
Examples
## Not run:
##
# load a tidal object
data(tidobj)
# get flow-normalized values for each quantile
res <- resnorm(tidobj)
# load a tidalmean object
data(tidobjmean)
# get flow-normalized values
res <- resnorm(tidobjmean)
## End(Not run)