<center>Goodness-of-fit Measures to Compare Observed and

knitr::opts_chunk$set(echo = TRUE)

Installation

Installing hydroGOF:

install.packages("hydroGOF")

Setting up the environment

library(hydroGOF)
require(zoo)
data(EgaEnEstellaQts)
obs <- EgaEnEstellaQts
sim <- obs 
gof(sim=sim, obs=obs)
sim[1:2000] <- obs[1:2000] + rnorm(2000, mean=10)
ggof(sim=sim, obs=obs, ftype="dm", FUN=mean)

Removing warm-up period

ggof(sim=sim, obs=obs, ftype="dm", FUN=mean, cal.ini="1963-01-01")
sim <- window(sim, start=as.Date("1963-01-01"))
obs <- window(obs, start=as.Date("1963-01-01"))

gof(sim, obs)

Analysis of the residuals

r <- sim-obs
library(hydroTSM)
smry(r) 
# daily, monthly and annual plots, boxplots and histograms
hydroplot(r, FUN=mean)
# daily, monthly and annual plots, boxplots and histograms
hydroplot(r, FUN=mean, pfreq="seasonal")

Software details

This tutorial was built under:

sessionInfo()$platform
sessionInfo()$R.version$version.string 
paste("hydroGOF", sessionInfo()$otherPkgs$hydroGOF$Version)

Version history



Try the hydroGOF package in your browser

Any scripts or data that you put into this service are public.

hydroGOF documentation built on March 14, 2020, 1:07 a.m.