Get WRTDS residuals for each quantile model. These are used to estimate goodness of fit of the model predictions.
wrtdsrsd(dat_in,...)## S3 method for class 'tidal'wrtdsrsd(dat_in, trace =TRUE,...)## S3 method for class 'tidalmean'wrtdsrsd(dat_in, trace =TRUE,...)
Arguments
dat_in: input tidal object which must already have fitted model data
...: arguments passed to or from other methods
trace: logical indicating if progress is shown in the console
Returns
Columns are added to the data of the tidal object for residuals and non-conditional residuals. Both are required to assess the goodness of fit measure described for quantile regression in Koenker and Machado (1999).
A tidal object with columns added to the predonobs attribute for the residuals ('rsd') and non-conditional residuals ('rsdnl') of each quantile model or a tidalmean object with columns added to the predonobs attribute for the residuals ('rsd') and back-transformed residuals ('bt_rsd').
Examples
## load a fitted model objectdata(tidfit)## run the functionres <- wrtdsrsd(tidfit)head(res)
References
Koenker, R., Machado, J.A.F. 1999. Goodness of fit and related inference processes for quantile regression. Journal of the American Statistical Association. 94(448):1296-1310.