WACScompare {WACS}R Documentation

Performs comparisons between two WACS data structures, or between two WACS simulation series

Description

The comparison is based on different types of statistics computed on WACSdata1 and WACSdata2, or WACSsim1 and WACSsim2

Usage

WACScompare(
  what = what,
  wacs1 = wacs1,
  wacspar = wacspar,
  wacs2 = wacs2,
  varname = varname,
  varname2 = NULL,
  base = 0,
  above = T,
  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 bivariate correlations
="CorTemp" Compares temporal correlations
="SumBase" Compares sums above a threshold
="Persistence" Compares persistence of a variable above (or below) a threshold
wacs1

Either WACS data obtained when calling WACSdata, or WACS simulations obtained when calling WACSsimul.

wacspar

WACS parameters estimated when calling WACSestim on wacs1

wacs2

Either WACS data obtained when calling WACSdata, or WACS simulations obtained when calling WACSsimul. Must be of the same class as wacs1

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

Note

wacs1 and wacs2 must be of the same WACS class. We must either have

class(wacs1)=class(wacs2)=class(WACSdata),

or class(wacs1)=class(wacs2)=class(WACSsimul).

If what="sim", data and simulations are displayed as a function of the day of the year, from 1 to 365. Smoothed versions daily average and daily envelopes (defined by average +/- 2. standard deviations) are also displayed.

If what="rain", qq-plots and superimposition of histograms and models of rain are produced for each season.

If what="MeanSd", boxplots of monthly means and monthly standard deviations are compared. The median value of the monthly mean, resp. monthly standard deviation, of the data are displayed on top of the boxplots computed on the simulations.

If what="BiVar", boxplots of monthly correlations coefficients between varname and varname2 are compared. The median value of the correlation coefficient computed on the data is displayed on top of the boxplots computed on the simulations.

If what="CorTemp", boxplots of monthly 1-day auto correlation are compared. The median value of the auto-correlation coefficient computed on the data is displayed on top of the boxplots computed on the simulations.

If what="SumBase", boxplots of the sum of the variable varname above a given threshold, base, is computed during the months provided in the variable months.

If what="Persistence", histograms of consecutive days of the variable varname above (or below) a given threshold, base, are compared. If above=TRUE, consecutive days above the threshold are computed, whereas days below the threshold are computed if above=FALSE. Months can be selected with the variable months.

Examples

## Not run: 
  ## Simple example
  data(ClimateSeries)
  ThisData = WACSdata(ClimateSeries,from="1995-01-01", to="2005-12-31")
  ThisPar  = WACSestim(ThisData)
  ThatData = WACSdata(ClimateSeries,from="2002-01-01", to="2012-12-31")
  Comp = WACScompare(what="Sim", wacs1=ThisData, wacspar=ThisPar,
                     wacs2=ThatData, varname="tmin")
  WACSplot(Comp)
  Comp = WACScompare(what="MeanSd",wacs1=ThisData, wacspar=ThisPar,
                     wacs2=ThatData, varname="RG")
  WACSplot(Comp)
  Comp = WACScompare(what="SumBase", wacs1=ThisData, wacspar=ThisPar,
                     wacs2=ThatData, varname="tmoy", base=5, months=2:5)
  WACSplot(Comp)
  Comp = WACScompare(what="Persistence",wacs1=ThisData, wacspar=ThisPar,
                     wacs2=ThatData, varname="tmin", base=0, above=FALSE)
  WACSplot(Comp)

## End(Not run)
 

[Package WACS version 1.1.0 Index]