File: envelopeArray.Rd

package info (click to toggle)
r-cran-spatstat.explore 3.7-0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,704 kB
  • sloc: ansic: 4,104; sh: 13; makefile: 5
file content (95 lines) | stat: -rw-r--r-- 2,977 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
\name{envelopeArray}
\alias{envelopeArray}
\title{
  Array of Simulation Envelopes of Summary Function
}
\description{
  Compute an array of simulation envelopes using
  a summary function that returns an array of curves.
}
\usage{
envelopeArray(X, fun, \dots, dataname = NULL, verb = FALSE, reuse = TRUE)
}
\arguments{
  \item{X}{
    Object containing point pattern data.
    A point pattern (object of class
    \code{"ppp"}, \code{"lpp"}, \code{"pp3"} or \code{"ppx"})
    or a fitted point process model
    (object of class \code{"ppm"}, \code{"kppm"} or \code{"lppm"}).
  }
  \item{fun}{
    Function that computes the desired summary statistic
    for a point pattern. The result of \code{fun} should be a
    function array (object of class \code{"fasp"}).
  }
  \item{\dots}{
  Arguments passed to \code{\link{envelope}} to control the simulations,
  or passed to \code{fun} when evaluating the function.
  }
  \item{dataname}{
    Optional character string name for the data.
  }
  \item{verb}{
    Logical value indicating whether to print progress reports.
  }
  \item{reuse}{
    Logical value indicating whether the envelopes in each panel
    should be based on the same set of simulated patterns
    (\code{reuse=TRUE}, the default)
    or on different, independent sets of simulated
    patterns (\code{reuse=FALSE}).
  }
}
\details{
  This command is the counterpart of \code{\link{envelope}}
  when the function \code{fun} that is evaluated on each simulated point pattern
  will return an object of class \code{"fasp"} representing an array of
  summary functions.

  Simulated point patterns are generated according to the
  rules described for \code{\link{envelope}}. In brief, 
  if \code{X} is a point pattern, the algorithm generates
  simulated point patterns of the same kind, according to complete
  spatial randomness. If \code{X} is a fitted model, the algorithm
  generates simulated point patterns according to this model.

  For each simulated point pattern \code{Y}, the function \code{fun}
  is invoked. The result \code{Z <- fun(Y, ...)} should be an object of
  class \code{"fasp"} representing an array of summary functions.
  The dimensions of the array \code{Z} should be the same
  for each simulated pattern \code{Y}.

  This algorithm finds the simulation envelope of the summary functions
  in each cell of the array. 
}
\value{
   An object of class \code{"fasp"} representing
   an array of envelopes.
}
\author{
   \spatstatAuthors.
}
\seealso{
  \code{\link{envelope}}, \code{\link{alltypes}}.
}
\examples{
  if(interactive()) {
    Nsim <- 19
    X <- finpines
    co <- "best"
  } else {
    ## smaller task to reduce check time
    Nsim <- 3
    X <- finpines[c(FALSE, TRUE)]
    co <- "none"
  }
  A <- envelopeArray(X, markcrosscorr, nsim=Nsim, correction=co)
  plot(A)
}
\keyword{spatial}
\keyword{nonparametric}
\keyword{iteration}
\concept{Goodness-of-fit}
\concept{Test of randomness}
\concept{Envelope of simulations}