fractal.dim           package:RandomFields           R Documentation

_f_r_a_c_t_a_l _d_i_m_e_n_s_i_o_n

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

     The function estimates the fractal dimension of a process

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

     fractal.dim(x, y = NULL, z = NULL, data,
                grid=TRUE, gridtriple = FALSE,
                bin= seq(min(ct$x[3, ]) / 2, 
                  min((ct$x[2,]-ct$x[1,]) / 4, vario.n * min(ct$x[3,]) + 1),
                  min(ct$x[3,])),
                vario.n=5,
                sort=TRUE,
                fft.m = c(65, 86), ## in 
                fft.max.length=Inf,
                fft.max.regr=150000,
                fft.shift = 50, # in 
                method=c("variogram", "fft"), 
                mode=c("plot", "interactive"),
                pch=16, cex=0.2, cex.main=0.85,
                PrintLevel = RFparameters()$Print,
                height=3.5,
                ...)

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

       x: matrix of coordinates, or vector of x coordinates; if 'x' is
          not given a grid with unit grid length is assumed

       y: vector of y coordinates

       z: vector of z coordinates

    data: the values measured.

    grid: determines whether the vectors 'x', 'y', and 'z' should be
          interpreted as a grid definition, see Details.  'grid' does
          not apply for 'T'.

gridtriple: logical. Only relevant if 'grid==TRUE'. If
          'gridtriple==TRUE' then 'x', 'y', and 'z' are of the form
          'c(start,end,step)'; if 'gridtriple==FALSE' then 'x', 'y',
          and 'z' must be vectors of ascending values. 

     bin: sequence of bin boundaries for the empirical variogram

 vario.n: first 'vario.n' value of the empirical variogram are used for
          the regression fit that are not 'NA'.

    sort: If 'TRUE' then the coordinates are permuted such that the
          largest grid length is in 'x'-direction; this is of interest
          for algorithms that slice higher dimensional fields into
          one-dimensional sections.

   fft.m: numeric vector of two components; interval of frequencies for
          which the regression should be calculated; the interval is
          given in percent of the range of the frequencies in log
          scale.

fft.max.length: The first dimension of the data is cut into pieces of
          length 'fft.max.length'.  For each piece the FFT is
          calculated and then the average for all pieces is taken.  The
          pieces may overlap, see the parameter 'fft.shift'.

fft.max.regr: If the 'fft.m' is too large, parts of the regression fit
          will take a very long time. Therefore, the regression fit is
          calculated only if the number points given by 'fft.m' is less
          than 'fft.max.regr'. 

fft.shift: This parameter is given in percent [of 'fft.max.length'] and
          defines the overlap of the pieces defined by
          'fft.max.length'. If 'fft.shift'=50 the WOSA estimator is
          given; if 'fft.shift'=100 no overlap exist.

  method: list of implemented methods to calculate the fractal
          dimension; see Details 

    mode: character.  A vector with components 'nographics', 'plot', or
          'interactive': 

          '_n_o_g_r_a_p_h_i_c_s' no graphical output

          '_p_l_o_t' the regression line is plotted

          '_i_n_t_e_r_a_c_t_i_v_e' the regression domain can be chosen
               interactively

          Usually only one mode is given.  Two modes may make sense in
          the combination c("plot", "interactive") in which case all
          the results are plotted first, and then the interactive mode
          is called.  In the interactive mode, the regression domain is
          chosen by two mouse clicks with the left mouse; a right mouse
          click leaves the plot. 

     pch: vector or scalar; sign by which data are plotted.

     cex: vector or scalar; size of 'pch'.

cex.main: The size of the title in the regression plots.

PrintLevel: integer.  If 'PrintLevel' is 0 nothing is printed.  If
          'PrintLevel==1' error messages are printed.  If
          'PrintLevel==2' warnings and the regression results are
          given.  If 'PrintLevel>2' tracing information is given. 

  height: height of the grahics window

     ...: graphical parameters

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

     The function calculates the fractal dimension by various methods:

        *  variogram method

        *  Fourier transform

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

     The function returns a list with elements 'vario',  'fft'
     corresponding to the 2 methods given in the Details.

     Each of the elements is itself a list that contains the following
     elements. 

       x: the x-coordinates used for the regression fit

       y: the y-coordinates used for the regression fit

    regr: the return list of the 'lsfit'

      sm: smoothed curve through the (x,y) points

     x.u: 'NULL' or the restricted x-coordinates given by the user in
          the interactive plot

     y.u: 'NULL' or y-coordinates according to 'x.u'

  regr.u: 'NULL' or the return list of 'lsfit' for 'x.u' and 'y.u'

       D: the fractal dimension

     D.u: 'NULL' or the fractal dimension corresponding to the user's
          regression line

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

     Martin Schlather, martin.schlather@cu.lu <URL:
     http://www.cu.lu/~schlathe>

_R_e_f_e_r_e_n_c_e_s:

     variogram method

        *  Constantine, A.G. and Hall, P. (1994) Characterizing surface
           smoothness via estimation of effective fractal dimension.
           _J. R. Statist. Soc. Ser. B_ *56*, 97-113.

     fft

        *  Chan, Hall and Poskitt (1995)

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

     'CovarianceFct', 'hurst'

