spatialEco (version 0.1-5)

pp.subsample: Point process random subsample

Description

Generates random subsample based on density estimate of observations

Usage

pp.subsample(x, n, window = "hull", sigma = "Scott", wts = NULL, gradient = 1, edge = FALSE)

Arguments

x
An sp class SpatialPointsDataFrame or SpatialPoints object
n
Number of random samples to generate
window
Type of window (hull or extent)
sigma
Bandwidth selection method for KDE, default is 'Scott'. Options are 'Scott', 'Stoyan', 'Diggle', 'likelihood', and 'geometry'
wts
Optional vector of weights corresponding to point pattern
gradient
A scaling factor applied to the sigma parameter used to adjust the gradient decent of the density estimate. The default is 1, for no adjustment (downweight < 1 | upweight > 1)
edge
Apply Diggle edge correction (TRUE/FALSE)

Value

sp class SpatialPointsDataFrame containing random subsamples

References

Berman, M. and Diggle, P. (1989) Estimating weighted integrals of the second-order intensity of a spatial point process. Journal of the Royal Statistical Society, series B 51, 81-92. Berman, M. and Diggle, P. (1989) Estimating weighted integrals of the second-order intensity of a spatial point process. Journal of the Royal Statistical Society, series B 51, 81-92.

Fithian, W & T. Hastie (2013) Finite-sample equivalence in statistical models for presence-only data. Annals of Applied Statistics 7(4): 1917-1939

Hengl, T., H. Sierdsema, A. Radovic, and A. Dilo (2009) Spatial prediction of species distributions from occurrence-only records: combining point pattern analysis, ENFA and regression-kriging. Ecological Modelling, 220(24):3499-3511

Loader, C. (1999) Local Regression and Likelihood. Springer, New York.

Scott, D.W. (1992) Multivariate Density Estimation. Theory, Practice and Visualization. New York, Wiley.

Stoyan, D. and Stoyan, H. (1995) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.

Warton, D.i., and L.C. Shepherd (2010) Poisson Point Process Models Solve the Pseudo-Absence Problem for Presence-only Data in Ecology. The Annals of Applied Statistics, 4(3):1383-1402

Examples

Run this code
 
require(spatstat)
require(sp) 
data(bei)  
  trees <- as(bei, 'SpatialPoints')
    n=round(length(trees) * 0.10, digits=0)  
      trees.wrs <- pp.subsample(trees, n=n, window='hull')   
        plot(trees, pch=19, col='black')
          plot(trees.wrs, pch=19, col='red', add=TRUE) 
            box()
             title('10% subsample')
          legend('bottomright', legend=c('Original sample', 'Subsample'), 
                 col=c('black','red'),pch=c(19,19))   

Run the code above in your browser using DataLab