ShowModels           package:RandomFields           R Documentation

_I_n_t_e_r_a_c_t_i_v_e _C_h_o_i_c_e _o_f _M_o_d_e_l_s _a_n_d _P_a_r_a_m_e_t_e_r_s

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

     `ShowModels' is an interactive plot of  models and one- or
     two-dimensional simulations; it allows for fitting variogram
     models by eye.

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

     ShowModels(covx=ifelse(is.null(empirical),4,max(empirical$c)),
                x=NULL, y=NULL, fixed.rs=FALSE, method=NULL, empirical=NULL,
                model=NULL, param=NULL, all.param=NULL, PracticalRange=FALSE, 
                legend=TRUE, register=0,...)

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

    covx: if a sinlge value is given, it is the largest distance for
          which the covariance functions or the variograms are plotted;
          otherwise the models are plotted for the given values, and
          the origin.

       x: if `NULL' simulations are not performed; otherwise it gives
          the x coordinates of a grid. 

       y: if `NULL' at most one-dimensional simulations are performed
          (depending on the value of `x'); otherwise `y' gives the y
          coordinates of a two-dimensional grid.

fixed.rs: if `TRUE' then the same random seed is used for all
          simulations.

  method: simulation method, see RFMethods; if `NULL' then a suitable
          simulation method is chosen automatically.

empirical: empirical variogram; a list as returned by
          `EmpiricalVariogram'.

   model: string; covariance model, see `CovarianceFct', or type
          `PrintModelList()' to get all options. If given this model is
          shown at the beginning. 

   param: parameter vector: `param=c(mean, variance, nugget,
          scale,...)'; the parameters must be given in this order; see
          `CovarianceFct' for more details. Only considered if `model'
          is given. If given `model' is initialized by `param'.

all.param: `all.param=c(mean, variance, nugget, scale)'; the parameters
          must be given in this order; If `all.param' is given then the
          parameters of all covariance functions are set to the given
          values.  The values are overwritten for a specific model if
          `model' and `param' are given. Note that it is not possible
          to set the values of additional parameters of a parametrised
          class by means of `all.param'.

PracticalRange: logical.  If `TRUE' the range of the covariance
          functions C(h) is adjusted so that the covariance function is
          about 0.05 for `scale==1' and distance h=1.

  legend: if `TRUE' then a legend is added to the two-dimensional plot;
          note that `legend' has a bug up to R-1.2.3.

register: register where intermediate results of the simulations are
          stored, see also `GaussRF'.

     ...: additional graphics options for the plot of the one- or
          two-dimensional simulations, see `plot' and `image'.

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

     The interactive plot consists of 4 parts:

        *  top left: graph of the covariance function or the variogram.
           In case `empirical' is given the empirical variogram is also
           plotted.  

        *  bottom left: one- or two-dimensional simulation

        *  top right: list of implemented models; a specific model is
           chosen by the left mouse button.

        *  bottom right: parameter list for the chosen model. This part
           is active if the name of the model is surrounded by
           asterixes. It is deactivated by clicking on the upper parts
           of the window. If the bottom right part is active then the
           numerical parameters of the model can be increased by
           clicking on the right hand side of the grey vertical line,
           and decreased by clicking on the left hand side. The farer
           away from the vertical line the larger the added or
           subtracted values. 
           The bottom lines give global parameters, which determine

           *  the `PracticalRange', see `RFparameters' for details

           *  the way the model is shown in the upper left part, namely
              as covariance function or as variogram.

     The interactive plot is left by clicking any mouse button
     different from the left when the top right part is active.

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

     list of the last model and its parameters.

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

     Martin Schlather, Martin.Schlather@uni-bayreuth.de <URL:
     http://www.geo.uni-bayreuth.de/~martin>

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

     `CovarianceFct', `GaussRF', `RFMethods', `RandomFields'.

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

     # first example: one-dimensional simulations
     close.screen(close.screen())
     RFparameters(Print=1)
     x <-  seq(1,10,0.1);
     ShowModels(x=x)

     # second example: two-dimensional simulations and
     #                 empirical variogram
     close.screen(close.screen())
     RFparameters(Print=1)
     dx <- runif(300,0,8)
     dy <- runif(300,0,8)
     dz <- GaussRF(x=dx, y=dy, grid=FALSE, model="gaus",
           param=c(1,2,1,2))
     ev <- EmpiricalVariogram(x=dx, y=dy, data=dz, grid=FALSE,
           bin=(-1:20)/4)
     x <-  seq(1,5,0.1);
     ShowModels(x=x,y=x,empirical=ev)

