spline.correlog.2D {ncf} | R Documentation |
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).
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))
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. |
see Sncf2D
An object of class "Sncf2D" is returned.
See Sncf2D
for details.
The function to estimate the UNIvariate anisotropic nonparametric (cross-)correlation function in arbitrary directions. In particular it was developed to calculate the univariate lagged cross-correlation function used in (Humston et al. 2005).
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.