clusterfit(X, clusters, lambda = NULL, startpar = NULL, q = 1/4, p = 2, rmin = NULL, rmax = NULL, ..., statistic = NULL, statargs = NULL, algorithm="Nelder-Mead")"Thomas", "MatClust",
    "Cauchy", "VarGamma" and "LGCP".
  "im") giving the
    intensity values at all locations, a fitted point process model
    (object of class "ppm" or "kppm")
    or a function(x,y) which
    can be evaluated to give the intensity value at any location.
  X is a point pattern sensible defaults
    are used. Otherwise rather arbitrary values are used.
  mincontrast.
  "K" or "pcf".
  statistic. See Details.
  "minconfit". There are methods for printing
  and plotting this object. See mincontrast.
mincontrast.
  
  If statistic="pcf" (or X appears to be an
  estimated pair correlation function) then instead of using the
  $K$-function, the algorithm will use the pair correlation
  function.  If X is a point pattern of class "ppp" an estimate of
  the summary statistic specfied by statistic (defaults to
  "K") is first computed before minimum contrast estimation is
  carried out as described above. In this case the argument
  statargs can be used for controlling the summary statistic
  estimation. The precise algorithm for computing the summary statistic
  depends on whether the intensity specification (lambda) is:
lambda is NUll or a single numeric the pattern is
      considered homogeneous and either Kest or
      pcf is invoked. In this case lambda is
      not used for anything when estimating the summary statistic.
    
      If lambda is a pixel image (object of class "im"),
      a fitted point process model (object of class "ppm" or
      "kppm") or a function(x,y) the pattern is considered
      inhomogeneous. In this case either Kinhom or
      pcfinhom is invoked with lambda as an
      argument.
      
    
  After the clustering parameters of the model have been estimated by
  minimum contrast lambda (if non-null) is used to compute the
  additional model parameter $mu$.
Moller, J. and Waagepetersen, R. (2003). Statistical Inference and Simulation for Spatial Point Processes. Chapman and Hall/CRC, Boca Raton.
Waagepetersen, R. (2007). An estimating function approach to inference for inhomogeneous Neyman-Scott processes. Biometrics 63 (2007) 252--258.
kppm
  fit <- clusterfit(redwood, "Thomas")
  fit
  if(interactive()){
    plot(fit)
  }
Run the code above in your browser using DataLab