compareME               package:qualV               R Documentation

_C_o_m_p_u_t_e _S_e_v_e_r_a_l _D_e_v_i_a_n_c_e _M_e_a_s_u_r_e_s _f_o_r _C_o_m_p_a_r_i_s_o_n

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     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(object, ..., digits = 3)
     ## S3 method for class 'compareME':
     summary(object, ...)

_A_r_g_u_m_e_n_t_s:

       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'.

  digits: number of significant digits displayed

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     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.

_S_e_e _A_l_s_o:

     'timeTransME', 'generalME'

_E_x_a_m_p_l_e_s:

     # 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")

