Get WRTDS prediction grid for observations of the response variable in a tidal or tidalmean object
wrtds(dat_in,...)## S3 method for class 'tidal'wrtds(dat_in, flo_div =10, tau =0.5, trace =TRUE, fill_empty =FALSE,...)## S3 method for class 'tidalmean'wrtds(dat_in, flo_div =10, fill_empty =FALSE, trace =TRUE,...)
Arguments
dat_in: input tidal or tidalmean object
...: arguments passed to or from other methods
flo_div: numeric indicating number of divisions across the range of salinity/flow to create the interpolation grid
tau: numeric vector indicating conditional quantiles to fit in the weighted regression, can be many
trace: logical indicating if progress is shown in the console
fill_empty: logical to fill missing values in interpolation grid using bilinear interpolation by season, see details
Returns
Appends interpolation grid attributes to the input object. For a tidal object, this could include multiple grids for each quantile. For tidalmean objects, only one grid is appended to the fits' attribute, in addition to a back-transformed grid as the bt_fits' attribute and a grid of the scale parameter of each prediction as the `scls' attribute. Grid rows correspond to the dates in the input data.
The fill_empty arguments uses bilinear interpolation of time by flow to fill missing data in the interpolation grids. The grids are subset by month before interpolating to retain the seasonal variation captured by the models. In general, this argument should not be used if more than ten percent of the interpolation grids are missing data. It may be helpful to improve visual appearance of some of the plotting results.
Examples
## Not run:## load datadata(chldat)## as tidal objectdat_in <- tidal(chldat)res <- wrtds(dat_in)## as tidalmean objectdat_in <- tidalmean(chldat)res <- wrtds(dat_in)## multiple quantilesres <- wrtds(dat_in, tau = c(0.1,0.5,0.9))## End(Not run)