Learn R Programming

WACS (version 1.1.0)

WACSvalid: Performs validations of WACS simulations

Description

The validation is based on different types of statistics computed on WACS data, WACS parameters and WACS simulations.

Usage

WACSvalid(
  what = "Sim",
  wacsdata = NULL,
  wacspar = NULL,
  wacssimul = NULL,
  varname = NULL,
  varname2 = NULL,
  base = 0,
  above = TRUE,
  months = 1:12
)

Arguments

what

Type of validation. Possible choices are:

="Sim" Compares a simulation run to data
="Rain" qq-plots of rainfall, per season
="MeanSd" Compares monthly mean and standard deviations
="BiVar" Compares monthly variate correlations
="CorTemp" Compares monthly temporal correlations
="SumBase" Compares sums above a threshold
="Persistence" Compares persistence of a variable above (or below) a threshold
wacsdata

WACS data obtained when calling WACSdata

wacspar

WACS parameters estimated when calling WACSestim

wacssimul

WACS simulation obtained when calling WACSsimul

varname

Variable on which the validation is performed

varname2

Second variable on which validation is performed (only needed if what=BiVar)

base

Threshold used for "SumBase" and "Persistence"

above

Boolean value used for "Persistence": TRUE if data is considered above threshold; FALSE otherwise

months

Months to which the analysis should be restricted (only for "SumBase" and "Persistence")

Value

A list containing all information needed for plots; contains also the type of validation, as a class

Examples

Run this code
# NOT RUN {
  ## Simple example
  data(ClimateSeries)
  ThisData = WACSdata(ClimateSeries)
  ThisPar  = WACSestim(ThisData)
  ThisSim  = WACSsimul(ThisPar, from="1995-01-01", to="2012-12-31")
  Val1 = WACSvalid(what="Sim",wacsdata = ThisData, 
                   wacspar = ThisPar, wacssimul = ThisSim, varname="tmin")
  Val2 = WACSvalid(what="MeanSd",wacsdata = ThisData, 
                   wacssimul = ThisSim, varname="RG")
  Val3 = WACSvalid(what="SumBase", wacsdata = ThisData,  
                   wacssimul = ThisSim, varname="tmoy", base=5, month=2:5)
  Val4 = WACSvalid(what="Persistence",wacsdata = ThisData,  
                   wacssimul = ThisSim, varname="tmin", base=0, above=FALSE)
# }

Run the code above in your browser using DataLab