R/quadrattest.R

Defines functions quadrat.test.ppm

Documented in quadrat.test.ppm

#
#   quadrattest.R
#
#   $Revision: 1.70 $  $Date: 2023/07/17 07:38:30 $
#

## Code for generic quadrat.test() and quadrat.test.ppp()
## is moved to spatstat.explore


quadrat.test.slrm <- quadrat.test.ppm <-
  function(X, nx=5, ny=nx,
           alternative = c("two.sided", "regular", "clustered"),      
           method=c("Chisq", "MonteCarlo"),
           conditional=TRUE, CR=1, df.est=NULL, ...,
           xbreaks=NULL, ybreaks=NULL,
           tess=NULL, nsim=1999)
{
   fitname <- short.deparse(substitute(X))
   dataname <- paste("data from", fitname)
   method <- match.arg(method)
   alternative <- match.arg(alternative)
   if(!is.poisson(X))
    stop("Test is only defined for Poisson point process models")
   if(is.marked(X))
    stop("Sorry, not yet implemented for marked point process models")
   Xdata <- response(X)
   dont.complain.about(Xdata)
   do.call(quadrat.testEngine,
          resolve.defaults(list(quote(Xdata), nx=nx, ny=ny,
                                alternative=alternative,
                                method=method,
                                conditional=conditional, CR=CR,
                                xbreaks=xbreaks, ybreaks=ybreaks,
                                tess=tess,
                                nsim=nsim, 
                                fit=X,
                                df.est=df.est),
                           list(...),
                           list(Xname=dataname, fitname=fitname)))
}



## code for quadrat.test.quadratcount is moved to spatstat.explore
## Infrastructure for quadrat.test is moved to spatstat.explore

Try the spatstat.model package in your browser

Any scripts or data that you put into this service are public.

spatstat.model documentation built on Sept. 11, 2024, 9:07 p.m.