Evaluation-class          package:distrTEst          R Documentation

_C_l_a_s_s "_E_v_a_l_u_a_t_i_o_n"

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

     When an estimator is used to data of the type "Dataclass" with the
     method evaluate, the result is an object of class "Evaluation".

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects could be created by calls of the form 'new("Evaluation",
     Data, estimator, [result, name, filename, call.ev])'. It does not
     seem to be very useful to generate a new object this way, however.
      It is to be preferred to use "evaluate" with a Dataclass object!

_S_l_o_t_s:

     '_c_a_l_l._e_v': Object of class '"call"' the call which created the
          object,  e.g.; ``evaluate(Dataclassobject,mean)'' 

     '_e_s_t_i_m_a_t_o_r': Object of class '"OptionalFunction"': estimation
          function used; this estimation function  should be able to
          deal with data in matrix form 'samplesize' x 'obsDim' and 
          should return either a univariate result or a vector (with
          named coordinates, if possible).

     '_f_i_l_e_n_a_m_e': Object of class '"character"': the filename of the
          evaluation; by default the filename of the Dataclass object,
          which was called by evaluate

     '_n_a_m_e': Object of class '"character"': the name of the evaluation;
          by default the name of the Dataclass object, which was called
          by evaluate 

     '_r_e_s_u_l_t': Object of class '"DataframeorNULL"': the result of the
          evaluation of the estimation on data 

_A_c_c_e_s_s_o_r_s/_R_e_p_l_a_c_e_m_e_n_t _f_u_n_c_t_i_o_n_s:

     _c_a_l_l._e_v no replacement possible 

     _e_s_t_i_m_a_t_o_r no replacement possible 

     _f_i_l_e_n_a_m_e replacement possible 

     _n_a_m_e replacement possible 

     _r_e_s_u_l_t no replacement possible

_M_e_t_h_o_d_s:

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "Evaluation")': initialize method 

     _p_l_o_t 'signature(object = "Evaluation")': returns a boxplot of the
          result 

     _p_r_i_n_t 'signature(object = "Evaluation")': returns the name of the
          data object, its filename, the estimator used and the result 

     _s_a_v_e_d_a_t_a 'signature(object = "Evaluation")': saves the object in
          two files in the directory of R - one with data, one without
          as comment file (see example) 

     _s_u_m_m_a_r_y 'signature(object = "Evaluation")': returns the name of
          the data object, its filename, the estimator used and a
          statistical summary of the result 

_N_o_t_e:

     The saved "evaluation" can be loaded with the usual load-command,
     the saved comment with the function cload.

_A_u_t_h_o_r(_s):

     Thomas Stabla statho3@web.de,
       Florian Camphausen fcampi@gmx.de,
      Peter Ruckdeschel Peter.Ruckdeschel@uni-bayreuth.de,
       Matthias Kohl Matthias.Kohl@stamats.de

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

     'Dataclass-class' 'Simulation-class' 'Contsimulation-class' 'load'
     'cload' 'savedata-methods' 'plot-methods' 'simulate-methods'
     'summary-methods'

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

     N <- Norm() # N is a standard normal distribution.
     C <- Cauchy() # C is a Cauchy distribution
     cs <- Contsimulation(filename = "csim",
                          runs = 5,
                          samplesize=5000,
                          seed=setRNG(),
                          distribution.id = N,
                          distribution.c = C,
                          rate = 0.1)
     simulate(cs)
     # Each of the 25000 random numbers is ideal (N-distributed) with
     # probability 0.9 and contaminated (C-distributed) with probability = 0.1
     summary(cs)
     ev1 <- evaluate(cs, mean, resname="mean") # estimates the data with mean
     ev1 # bad results
     ev2 <- evaluate(cs,median, resname="median") # estimates the data with median
     ev2 # better results because median is robust
     savedata(ev1)
     # saves the evaluation with result as "csim.mean" and without result as
     # "csim.mean.comment" in the working directory # of R - "csim" is the
     # filename of the Contsimulation object, mean the name of the estimator
     rm(ev1)
     cload("csim.mean")
     # loads the evaluation without result - the object is called ev1.comment
     ev1.comment
     load("csim.mean") # loads the evaluation with result
     ev1
     plot(ev1)
     #
     #another function to be evaluated:
     severalThings<- function(x) {list("mean"=mean(x),"sd"=sd(x), "mad"=mad(x))}
     ev3 <- evaluate(cs, severalThings, resname="several") 
     plot(ev3)
     plot(ev3, ylim=c(0,10), col=c("blue","green", "red"))

