compareME {qualV}R Documentation

Compute Several Deviance Measures for Comparison

Description

Various deviance measures are computed allowing the user to find the aspects in which two time series differ.

Usage

compareME(o, p,
          o.t      = seq(0, 1, length.out = length(o)),
          p.t      = seq(0, 1, length.out = length(p)),
          ignore   = c("raw", "centered", "scaled", "ordered"),
          geometry = c("real", "logarithmic", "geometric", "ordinal"),
          measure  = c("mad", "var", "sd"),
          type     = "normalized",
          time     = "fixed", ..., col.vars=c("time", "ignore")
         )

Arguments

o vector of observed values
p vector of predicted values
o.t vector of observation times
p.t vector of times for predicted values
ignore a sublist of "raw", "centered", "scaled", "ordered" as defined in
generalME to specify the aspects of the data to be ignored.
geometry a sublist of "real", "logarithmic", "geometric", "ordinal" as defined in generalME to specify the geometry of the observed data.
measure a sublist of "mad", "var", "sd" to specify the type of error to be measured.
type a sublist of code{"dissimilarity", "normalized", "similarity", "reference"} as defined in generalME to specify the type of deviance measure to be used.
time a sublist of "fixed", "transform", indicates wether the time should actually be transformed. If this argument and the time arguments are missing the comparison is based on values only without time matching.
... further arguments passed to timeTransME
col.vars a sublist of "ignore", "geometry", "measure", "time" to be displayed in the columns of the resulting ftable.

Details

The function provides a simple standard interface to get a first idea on the similarities and dissimilarities of two time series spanning the same time interval.

Value

The result is a list of ftables containing the deviance measures of all requested combinations of parameters. The list is done over the different types of measures requested.

See Also

timeTransME, generalME

Examples

# a constructed example
x <- seq(0, 2*pi, 0.1)
y <- 5 + sin(x)           # a process
o <- y + rnorm(x, sd=0.2) # observation with random error
p <- y + 0.1              # simulation with systematic bias

os <- ksmooth(x, o, kernel="normal", bandwidth=dpill(x, o), x.points = x)$y
plot(x, o); lines(x, p); lines(x, os, col="red")

compareME(o, p)
compareME(os, p)

# observed and measured data with non-matching time intervals
data(phyto)
compareME(obs$y, sim$y, obs$t, sim$t, time = "fixed")
tt <- timeTransME(obs$y, sim$y, obs$t, sim$t, ME = SMSLE, trials = 5)
compareME(tt$yo, tt$yp)

# show names of deviance measures
compareME(type = "name")

[Package qualV version 0.2-2 Index]