wrtdsrsd {WRTDStidal}R Documentation

Get WRTDS residuals

Description

Get WRTDS residuals for each quantile model. These are used to estimate goodness of fit of the model predictions.

Usage

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

Value

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').

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.

See Also

wrtds, wrtdsperf, goodfit

Examples

## load a fitted model object
data(tidfit)

## run the function
res <- wrtdsrsd(tidfit)
head(res)

[Package WRTDStidal version 1.1.4 Index]