Learn R Programming

ncf (version 1.1-2)

spline.correlog.2D: Anisotropic nonparametric (cross-)correlation function for univariate spatial data

Description

spline.correlog.2D is the function to estimate the anisotropic nonparametric correlation function in 8 (or arbitrary) directions (North - Southeast) for univariate data. Correlation functions are calculated for each different bearing. The function assumes univariate observations at each location. (use Sncf2D otherwise).

Usage

spline.correlog.2D(x, y, z, w = NULL, df = NULL, type = "boot", 
resamp = 1000, npoints = 300, save = FALSE, max.it = 25, xmax = FALSE, 
na.rm = FALSE, jitter = FALSE, quiet = FALSE,
angle = c(0, 22.5, 45, 67.5, 90, 112.5, 135, 157.5))

Arguments

x
vector of length n representing the x coordinates.
y
vector of length n representing the y coordinates.
z
vector of length n representing the observation at each location.
w
an optional second vector of length n for variable 2 (to estimate spatial or lagged cross-correlation functions).
df
degrees of freedom for the spline. Default is sqrt(n).
type
takes the value "boot" (default) to generate a bootstrap distribution or "perm" to generate a null distribution for the estimator
resamp
the number of resamples for the bootstrap or the null distribution.
npoints
the number of points at which to save the value for the spline function (and confidence envelope / null distribution).
save
if TRUE the whole matrix of output from the resampling is saved (an resamp x npoints dimensional matrix).
max.it
the maximum iteration for the Newton method used to estimate the intercepts.
xmax
if FALSE the max observed in the data is used. Otherwise all distances greater than xmax is omitted.
na.rm
if TRUE, NA's will be dealt with through pairwise deletion of missing values for each pair of time series -- it will dump if any one pair has less than two (temporally) overlapping observations.
jitter
if TRUE, jitters the distance matrix, to avoid problems associated with fitting the function to data on regular grids
quiet
if TRUE the counter is supressed during execution.
angle
specifies number of cardinal directions and angles for which to calculate correlation functions. Default are 8 directions between 0 and 180.

Value

  • An object of class "Sncf2D" is returned. See Sncf2D for details.

Details

see Sncf2D

References

Humston, R., Mortensen, D. and Bjornstad, O.N. 2005. Anthropogenic forcing on the spatial dynamics of an agricultural weed: the case of the common sunflower. Journal of Applied Ecology 42: 863-872.

See Also

Sncf2D