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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
\name{linearpcfdot.inhom}
\alias{linearpcfdot.inhom}
\title{
Inhomogeneous Multitype
Pair Correlation Function (Dot-type) for Linear Point Pattern
}
\description{
For a multitype point pattern on a linear network,
estimate the inhomogeneous multitype pair correlation function
from points of type \eqn{i} to points of any type.
}
\usage{
linearpcfdot.inhom(X, i, lambdaI, lambdadot, r=NULL, \dots,
correction="Ang", normalise=TRUE,
sigma=NULL, adjust.sigma=1,
bw="nrd0", adjust.bw=1)
}
\arguments{
\item{X}{The observed point pattern,
from which an estimate of the \eqn{i}-to-any pair correlation function
\eqn{g_{i\bullet}(r)}{g[i.](r)} will be computed.
An object of class \code{"lpp"} which
must be a multitype point pattern (a marked point pattern
whose marks are a factor).
}
\item{i}{Number or character string identifying the type (mark value)
of the points in \code{X} from which distances are measured.
Defaults to the first level of \code{marks(X)}.
}
\item{lambdaI}{
Intensity values for the points of type \code{i}. Either a numeric vector,
a \code{function}, a pixel image
(object of class \code{"im"} or \code{"linim"}) or
a fitted point process model (object of class \code{"ppm"}
or \code{"lppm"}) or \code{NULL}.
}
\item{lambdadot}{
Intensity values for all points of \code{X}. Either a numeric vector,
a \code{function}, a pixel image
(object of class \code{"im"} or \code{"linim"}) or
a fitted point process model (object of class \code{"ppm"}
or \code{"lppm"}) or \code{NULL}.
}
\item{r}{numeric vector. The values of the argument \eqn{r}
at which the function
\eqn{g_{i\bullet}(r)}{g[i.](r)} should be evaluated.
There is a sensible default.
First-time users are strongly advised not to specify this argument.
See below for important conditions on \eqn{r}.
}
\item{correction}{
Geometry correction.
Either \code{"none"} or \code{"Ang"}. See Details.
}
\item{\dots}{
Arguments passed to \code{\link[stats]{density.default}}
to control the kernel smoothing.
}
\item{normalise}{
Logical. If \code{TRUE} (the default), the denominator of the estimator is
data-dependent (equal to the sum of the reciprocal intensities at
the points of type \code{i}), which reduces the sampling variability.
If \code{FALSE}, the denominator is the length of the network.
}
\item{sigma}{
Smoothing bandwidth passed to \code{\link{density.lpp}}
for estimation of intensities when either \code{lambdaI} or
\code{lambdadot} is \code{NULL}.
}
\item{adjust.sigma}{
Numeric value. \code{sigma} will be multiplied by this value.
}
\item{bw}{
Smoothing bandwidth (passed to \code{\link[stats]{density.default}})
for one-dimensional kernel smoothing of the pair correlation function.
Either a numeric value, or a character string recognised
by \code{\link[stats]{density.default}}.
}
\item{adjust.bw}{
Numeric value. \code{bw} will be multiplied by this value.
}
}
\value{
An object of class \code{"fv"} (see \code{\link[spatstat.explore]{fv.object}}).
}
\details{
This is a counterpart of the function \code{\link[spatstat.explore]{pcfdot.inhom}}
for a point pattern on a linear network (object of class \code{"lpp"}).
The argument \code{i} will be interpreted as
levels of the factor \code{marks(X)}.
If \code{i} is missing, it defaults to the first
level of the marks factor.
The argument \code{r} is the vector of values for the
distance \eqn{r} at which \eqn{g_{i\bullet}(r)}{g[i.](r)}
should be evaluated.
The values of \eqn{r} must be increasing nonnegative numbers
and the maximum \eqn{r} value must not exceed the radius of the
largest disc contained in the window.
If \code{lambdaI} or \code{lambdadot} is missing or \code{NULL}, it will
be estimated by kernel smoothing using \code{\link{density.lpp}}.
If \code{lambdaI} or \code{lambdadot} is a fitted point process model,
the default behaviour is to update the model by re-fitting it to
the data, before computing the fitted intensity.
This can be disabled by setting \code{update=FALSE}.
}
\references{
Baddeley, A, Jammalamadaka, A. and Nair, G. (2014)
Multitype point process analysis of spines on the
dendrite network of a neuron.
\emph{Applied Statistics} (Journal of the Royal Statistical
Society, Series C), \bold{63}, 673--694.
}
\section{Warnings}{
The argument \code{i} is interpreted as a
level of the factor \code{marks(X)}. Beware of the usual
trap with factors: numerical values are not
interpreted in the same way as character values.
}
\seealso{
\code{\link{linearpcfcross.inhom}},
\code{\link{linearpcfdot}},
\code{\link[spatstat.explore]{pcfdot.inhom}}.
}
\examples{
lam <- table(marks(chicago))/(summary(chicago)$totlength)
lamI <- function(x,y,const=lam[["assault"]]){ rep(const, length(x)) }
lam. <- function(x,y,const=sum(lam)){ rep(const, length(x)) }
g <- linearpcfdot.inhom(chicago, "assault", lamI, lam.)
# using fitted models for the intensity
# fit <- lppm(chicago, ~marks + x)
# linearpcfdot.inhom(chicago, "assault", fit, fit)
}
\author{\adrian}
\keyword{spatial}
\keyword{nonparametric}
\concept{Linear network}
|