Extract model summary statistics from a loadComp model
Source:R/loadComp.R
summarizeModel.loadComp.RdProduce a 1-row data.frame of model metrics. The relevant metrics for loadComp models include two sets of statistics about autocorrelation (one for the regression residuals, one for the 'residuals' used to do the composite correction).
Usage
# S3 method for class 'loadComp'
summarizeModel(load.model, newdata, irregular.timesteps.ok = NA, ...)Arguments
- load.model
A load model object, typically inheriting from loadModel and always implementing the loadModelInterface.
- newdata
data.frame of data that was/will be used to predict concentration or load; should be the same as the
newdataargument topredictSolute, e.g. a data.frame of daily or instantaneous dates and discharges.- irregular.timesteps.ok
logical. If FALSE, this function requires that the timesteps between observations are identical to one another, and a plot is generated and an error is thrown if this requirement is not met. If TRUE, the check is not performed. If NA (the default), the check is performed but the function proceeds with a warning and no plot if the timesteps are found to be irregular. Tests and estimates of autocorrelation are weak to wrong when timesteps are irregular, but timesteps are often at least a bit irregular in the real world.
- ...
Other arguments passed to model-specific methods
Value
Returns a 1-row data frame with the following columns:
site.id- the unique identifier of the site, as inmetadata()constituent- the unique identifier of the constituent, as inmetadata()RMSE.linorRMSE.log- the square root of the mean squared error, in log space (RMSE.log) if theuse.logequalledTRUEin the call toloadComp()that created this model.reg.durbin.watson- the Durbin Watson test statistic as applied to the residuals from the regression model fitting processreg.rho- the autocorrelation coefficient of the residuals from the regression model fitting processint.durbin.watson- the Durbin Watson test statistic as applied to the residuals from the interpolation model fitting process. SeeresidDurbinWatson()int.rho- the autocorrelation coefficient of the residuals from the interpolation model fitting process. SeeestimateRho()correction.frac- the correction fraction, i.e., the fraction of total concentration or flux prediction that is attributable to a correction such as the residuals correction of composite method models. SeegetCorrectionFraction()
See also
Other summarizeModel:
summarizeModel(),
summarizeModel.loadInterp(),
summarizeModel.loadLm(),
summarizeModel.loadModel(),
summarizeModel.loadReg2()