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")
)
## S3 method for class 'compareME'
print(x, ..., digits = 3)
## S3 method for class 'compareME'
summary(object, ...)
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 subset of |
geometry |
a subset of |
measure |
a subset of |
type |
a subset of |
time |
a subset of |
... |
further arguments passed to |
col.vars |
a subset of |
digits |
number of significant digits displayed, |
x , object |
objects of class |
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. The print
and summary
methods extract
the relevant information, rounded to an optional number of significant
digits.
Value
The result is a list of ftable
s containing the deviance
measures of all requested combinations of parameters. The list is done
over the different types of measures requested.
See Also
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")