Title: | Two-Way ANOVA-Like Method to Analyze Replicated Point Patterns |
---|---|
Description: | Test for effects of both individual factors and their interaction on replicated spatial patterns in a two factorial design, as explained in Ramon et al. (2016) <doi:10.1111/ecog.01848>. |
Authors: | Marcelino de la Cruz Rot |
Maintainer: | Marcelino de la Cruz <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1-5 |
Built: | 2024-11-11 06:56:37 UTC |
Source: | CRAN |
A list with a) a list of 16 point patterns (with the ppp format of spatstat
) of Croton wagneri in Soutern Ecuador; b) a factor with different elevations ("high", "slow") and c) a factor with different topographical conditions ("steep" or "flat" slope) for each point pattern. Each point pattern is actually the result of a random thining (50 percent) of the original pattern analyzed by Ramon et al. (in revision).
data("croton")
data("croton")
Ramon, P., De la Cruz, M., Chacon-Labella, J. & Escudero, A. (in revision). A new two-way ANOVA-like method for analyzing replicated point patterns in ecology.
data(croton)
data(croton)
Test for effects of both individual factors and their interaction on replicated spatial patterns in a two factorial design.
K2w(pplist = NULL, dataKijk = NULL, nijk = NULL, r, r0 = NULL, rmax = NULL, tratA, tratB = NULL, wt = NULL, nsim = 999, correction = "trans", ...) ## S3 method for class 'k2w' print(x,...) ## S3 method for class 'k2w' plot(x, trat=NULL, ..., lty = NULL, col = NULL, lwd = NULL, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, legend = TRUE, legendpos = "topleft", fun="L", main=NULL)
K2w(pplist = NULL, dataKijk = NULL, nijk = NULL, r, r0 = NULL, rmax = NULL, tratA, tratB = NULL, wt = NULL, nsim = 999, correction = "trans", ...) ## S3 method for class 'k2w' print(x,...) ## S3 method for class 'k2w' plot(x, trat=NULL, ..., lty = NULL, col = NULL, lwd = NULL, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, legend = TRUE, legendpos = "topleft", fun="L", main=NULL)
pplist |
A list of point patterns with the ppp format of spatstat. This argument os alternative to |
dataKijk |
A |
nijk |
A vector with the number of points in each of the replicated point patterns. |
r |
Vector of values for the argument r at which the K functions have been or should be evaluated. If the K functions are to be computed (i.e., if |
r0 |
Minimum r value for which K(r) estimates will be employed to compute BTSS. |
rmax |
Maximum r value for which K(r) estimates will be employed to compute BTSS. |
tratA |
A |
tratB |
A |
wt |
A weighting function employed to compute the BTSS. It can be either an R expression, a vector (with |
nsim |
Number of resamples to estimate the sampling distribution of the BTSS statistic. |
correction |
Any selection of the options "border", "bord.modif", "isotropic", "Ripley", "translate", "translation", "none" or "best". It specifies the edge correction to be applied if K functions should be computed. |
... |
Additional arguments for Kest function of spatstat (only applies if K functions should be computed) or additional graphical arguments for the matplot function. |
x |
an object of class |
trat |
(optional) Factor employed to compute the averaged K functions that will be ploted. By default, |
lty |
(optional) numeric vector of values of the graphical parameter |
col |
(optional) numeric vector of values of the graphical parameter |
lwd |
(optional) numeric vector of values of the graphical parameter |
xlim |
(optional) range of x axis. |
ylim |
(optional) range of y axis. |
xlab |
(optional) label for x axis. |
ylab |
(optional) label for y axis. |
legend |
Logical flag or |
legendpos |
The position of the legend. Either a character string keyword (see legend for keyword options) or a pair of coordinates in the format |
fun |
One of |
main |
text to display as the title of the plot. By default, the name of the |
This function implements a extension of the non-parametric one-way ANOVA-like method of Diggle et al. (1991) to the two-way case, and particularly to test the effects of the interaction of two factors on the spatial structure of replicated point patterns. From a set of K functions, it generates weighted averaged K functions for each level and combinations of levels of the factors and computes a statistic analogous to a between-treatment sum of squares (BTSS) in clasical ANOVA. More details are available in Ramon et al. (in revision).
K2w
returns an object of class k2w
. Basically, a list with components:
btss.i |
Between treatment sum of squares (BTSS) for factor A. |
btss.j |
BTSS for factor B. |
btss.ij |
BTSS for the interaction of factors A and B. |
btss.i.res |
Resampled distribution of the BTSS statistic for factor A. |
btss.j.res |
Resampled distribution of BTSS for factor B. |
btss.ij.res |
Resampled distribution of BTSS for the interaction of factors A and B. |
KrepA |
Weighted average of the replicated K functions for each level of factor A. |
KrepB |
Weighted average of the replicated K functions for each level of factor B. |
KrepAB |
Weighted average of the replicated K functions for each combination of levels of factors A and B. |
K0i |
Global weighted average (i.e., all K fucntions averaged together). |
K0j |
Global weighted average (i.e., all K fucntions averaged together). |
K0ij |
Global weighted average (i.e., all K fucntions averaged together). |
Rik |
Data.frame with the residual functions for factor A. |
Rjk |
Data.frame with the residual functions for factor B. |
Rijk |
Data.frame with the residual functions for the interaction of factors A and B. |
nsumA |
Total number of points among the replicates in each level of factor A. |
nsumB |
Total number of points among the replicates in each level of factor B. |
nsumAB |
Total number of points among the replicates in each combinatipon of levels of factors A and B. |
wt |
Weighting function employed to compute the BTSS. |
tratA |
Factor A. |
tratB |
Factor B. |
tratAB |
Factor with the combination of levels of A and B. |
dataKijk |
Data.frame with the empirical, replicated, K-functions. |
nijk |
Vector with the number of points in each replicate. |
r |
Vector of r distances at which K functions are estimated. |
r0 |
Minimum r value for which K values have been employed to compute BTSS. |
KA.res |
Data.frame with the weighted average of replicated K functions for each level of factor A, for each of the nsim resamples. |
KB.res |
Data.frame with the weighted average of replicated K functions for each level of factor B, for each of the nsim resamples. |
KAB.res |
Data.frame with the weighted average of replicated K functions for each combination of levels of factors A and B, for each of the nsim resamples. |
nameA |
name of the R object with factor A. |
nameB |
name of the R object with factor B. |
Marcelino de la Cruz
Diggle, P.J., Nicholas, L. & Benes, F.M. (1991) Analysis of Variance for Replicated Spatial Point Patterns in Clinical Neuroanatomy. Journal of the American Statistical Association, 86: 618-625.
Ramon, P., De la Cruz, M., Chacon-Labella, J. & Escudero, A. (2016). A new two-way ANOVA-like method for analyzing replicated point patterns in ecology. Ecography, 39:1109-1117. doi:10.1111/ecog.01848.
# Get the data data(croton) croton.2w <- K2w(pplist=croton$list.ppp, r=seq(0,8, by=0.1), tratA=croton$elevation, tratB=croton$slope, nsim=99) croton.2w plot(croton.2w) plot(croton.2w, "tratB")
# Get the data data(croton) croton.2w <- K2w(pplist=croton$list.ppp, r=seq(0,8, by=0.1), tratA=croton$elevation, tratB=croton$slope, nsim=99) croton.2w plot(croton.2w) plot(croton.2w, "tratB")