Learn R Programming

spatstat.linnet (version 3.4-0)

rhohat.lpp: Nonparametric Estimate of Intensity as Function of a Covariate

Description

Computes a nonparametric estimate of the intensity of a point process on a linear network, as a function of a (continuous) spatial covariate.

Usage

# S3 method for lpp
rhohat(object, covariate, ...,
       weights=NULL,
       method=c("ratio", "reweight", "transform"),
       horvitz=FALSE,
       smoother=c("kernel", "local", "decreasing", "increasing",
                   "mountain", "valley", "piecewise"),
       subset=NULL,
       do.CI=TRUE, 
       jitter=TRUE, jitterfactor=1, interpolate=TRUE,    
       nd=1000, eps=NULL, random=TRUE, 
       n = 512, bw = "nrd0", adjust=1, from = NULL, to = NULL,
       bwref=bw,
       covname, confidence=0.95, positiveCI, breaks=NULL)

# S3 method for lppm rhohat(object, covariate, ..., weights=NULL, method=c("ratio", "reweight", "transform"), horvitz=FALSE, smoother=c("kernel", "local", "decreasing", "increasing", "mountain", "valley", "piecewise"), subset=NULL, do.CI=TRUE, jitter=TRUE, jitterfactor=1, interpolate=TRUE, nd=1000, eps=NULL, random=TRUE, n = 512, bw = "nrd0", adjust=1, from = NULL, to = NULL, bwref=bw, covname, confidence=0.95, positiveCI, breaks=NULL)

Arguments

Value

A function value table (object of class "fv") containing the estimated values of \(\rho\)

(and confidence limits) for a sequence of values of \(Z\). Also belongs to the class "rhohat"

which has special methods for print, plot

and predict.

Details

This command estimates the relationship between point process intensity and a given spatial covariate. Such a relationship is sometimes called a resource selection function (if the points are organisms and the covariate is a descriptor of habitat) or a prospectivity index (if the points are mineral deposits and the covariate is a geological variable). This command uses nonparametric methods which do not assume a particular form for the relationship.

If object is a point pattern, and baseline is missing or null, this command assumes that object is a realisation of a point process with intensity function \(\lambda(u)\) of the form $$\lambda(u) = \rho(Z(u))$$ where \(Z\) is the spatial covariate function given by covariate, and \(\rho(z)\) is the resource selection function or prospectivity index. A nonparametric estimator of the function \(\rho(z)\) is computed.

If object is a point pattern, and baseline is given, then the intensity function is assumed to be $$\lambda(u) = \rho(Z(u)) B(u)$$ where \(B(u)\) is the baseline intensity at location \(u\). A nonparametric estimator of the relative intensity \(\rho(z)\) is computed.

If object is a fitted point process model, suppose X is the original data point pattern to which the model was fitted. Then this command assumes X is a realisation of a Poisson point process with intensity function of the form $$ \lambda(u) = \rho(Z(u)) \kappa(u) $$ where \(\kappa(u)\) is the intensity of the fitted model object. A nonparametric estimator of the relative intensity \(\rho(z)\) is computed.

The nonparametric estimation procedure is controlled by the arguments smoother, method and horvitz.

The argument smoother selects the type of estimation technique.

  • If smoother="kernel" (the default), the nonparametric estimator is a kernel smoothing estimator of \(\rho(z)\) (Guan, 2008; Baddeley et al, 2012). The estimated function \(\rho(z)\) will be a smooth function of \(z\) which takes nonnegative values. If do.CI=TRUE (the default), confidence bands are also computed, assuming a Poisson point process. See the section on Smooth estimates.

  • If smoother="local", the nonparametric estimator is a local regression estimator of \(\rho(z)\) (Baddeley et al, 2012) obtained using local likelihood. The estimated function \(\rho(z)\) will be a smooth function of \(z\). If do.CI=TRUE (the default), confidence bands are also computed, assuming a Poisson point process. See the section on Smooth estimates.

  • If smoother="increasing", we assume that \(\rho(z)\) is an increasing function of \(z\), and use the nonparametric maximum likelihood estimator of \(\rho(z)\) described by Sager (1982). The estimated function will be a step function, that is increasing as a function of \(z\). Confidence bands are not computed. See the section on Monotone estimates.

  • If smoother="decreasing", we assume that \(\rho(z)\) is a decreasing function of \(z\), and use the nonparametric maximum likelihood estimator of \(\rho(z)\) described by Sager (1982). The estimated function will be a step function, that is decreasing as a function of \(z\). Confidence bands are not computed. See the section on Monotone estimates.

  • If smoother="mountain", we assume that \(\rho(z)\) is a function with an inverted U shape, with a single peak at a value \(z_0\), so that \(\rho(z)\) is an increasing function of \(z\) for \(z < z_0\) and a decreasing function of \(z\) for \(z > z_0\). We compute the nonparametric maximum likelihood estimator. The estimated function will be a step function, which is increasing and then decreasing as a function of \(z\). Confidence bands are not computed. See the section on Unimodal estimates.

  • If smoother="valley", we assume that \(\rho(z)\) is a function with a U shape, with a single minimum at a value \(z_0\), so that \(\rho(z)\) is a decreasing function of \(z\) for \(z < z_0\) and an increasing function of \(z\) for \(z > z_0\). We compute the nonparametric maximum likelihood estimator. The estimated function will be a step function, which is decreasing and then increasing as a function of \(z\). Confidence bands are not computed. See the section on Unimodal estimates.

  • If smoother="piecewise", the estimate of \(\rho(z)\) is piecewise constant. The range of covariate values is divided into several intervals (ranges or bands). The endpoints of these intervals are the breakpoints, which may be specified by the argument breaks; there is a sensible default. The estimate of \(\rho(z)\) takes a constant value on each interval. The estimate of \(\rho(z)\) in each interval of covariate values is simply the average intensity (number of points per unit length) in the relevant sub-region of the network. If do.CI=TRUE (the default), confidence bands are also computed, assuming a Poisson point process.

See Baddeley (2018) for a comparison of these estimation techniques for two-dimensional point patterns.

If the argument weights is present, then the contribution from each data point X[i] to the estimate of \(\rho\) is multiplied by weights[i].

If the argument subset is present, then the calculations are performed using only the data inside this spatial region.

This technique assumes that covariate has continuous values. It is not applicable to covariates with categorical (factor) values or discrete values such as small integers.

The argument covariate should be a pixel image, or a function, or one of the strings "x" or "y" signifying the cartesian coordinates. It will be evaluated on a fine grid of locations, with spatial resolution controlled by the arguments eps,nd,random. The argument nd specifies the total number of test locations on the linear network, eps specifies the linear separation between test locations, and random specifies whether the test locations have a randomised starting position.

References

Baddeley, A., Chang, Y.-M., Song, Y. and Turner, R. (2012) Nonparametric estimation of the dependence of a point process on spatial covariates. Statistics and Its Interface 5 (2), 221--236.

Baddeley, A. and Turner, R. (2005) Modelling spatial point patterns in R. In: A. Baddeley, P. Gregori, J. Mateu, R. Stoica, and D. Stoyan, editors, Case Studies in Spatial Point Pattern Modelling, Lecture Notes in Statistics number 185. Pages 23--74. Springer-Verlag, New York, 2006. ISBN: 0-387-28311-0.

Baddeley, A. (2018) A statistical commentary on mineral prospectivity analysis. Chapter 2, pages 25--65 in Handbook of Mathematical Geosciences: Fifty Years of IAMG, edited by B.S. Daya Sagar, Q. Cheng and F.P. Agterberg. Springer, Berlin.

Guan, Y. (2008) On consistent nonparametric intensity estimation for inhomogeneous spatial point processes. Journal of the American Statistical Association 103, 1238--1247.

Handcock, M.S. and Morris, M. (1999) Relative Distribution Methods in the Social Sciences. Springer, New York.

Sager, T.W. (1982) Nonparametric maximum likelihood estimation of spatial patterns. Annals of Statistics 10, 1125--1136.

See Also

rho2hat, methods.rhohat, parres.

See lppm for a parametric method for the same problem.

Examples

Run this code
  Y <- runiflpp(30, simplenet)
  rhoY <- rhohat(Y, "y")

  ## do spiders prefer to be in the middle of a segment?
  teepee <- linfun(function(x,y,seg,tp){ tp }, domain(spiders))
  rhotee <- rhohat(spiders, teepee)
  rhoteeM <- rhohat(spiders, teepee, smoother="mountain")
  if(interactive()) {
    plot(rhotee, main="Spider preference for mid-segment")
    plot(rhoteeM, add=TRUE, .y ~ .x, lwd=3)
  }

Run the code above in your browser using DataLab