kfunc.weights.calc: Calculate kfunction weights

Description Usage Arguments Author(s) Examples

Description

These functions calcuate the regressioin weights for the models following certain options.

Usage

1
2
3
4
5
6
kfunc.weights.calc(pppx, pppy = NULL, r = NULL, correction = NULL, type
  = c("nx", "nx_A", "nx2", "nx2_A", "sqrtnxny", "nxny", "nxny_A",
  "sqrtnxny_A"))
abundance.weights.calc(pppx, pppy = NULL, square = FALSE, Acorr = FALSE,
  r = NULL, correction = NULL)
ratio.weights.calc(pppx, pppy = NULL, r = NULL, correction = "border")

Arguments

pppx

A ppp object

pppy

A second ppp object for bivariate analyses - defaults to NULL

r

Distances at which to calculate weights. Must start at 0.

correction

Edge correction corresponding to options in spatstat::Kest

type

Type of regression weights. Must be one of "nx", "nx_A", "nx2", "nx2_A", "sqrtnxny", "nxny", "nxny_A", "sqrtnxny_A"

square

Should the square of nx be used (or nx*ny in the bivariate case). Not used by user.

Author(s)

Robert Bagchi Maintainer: Robert Bagchi <robert.bagchi@uconn.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (pppx, pppy = NULL, r = NULL, correction = NULL, type = c("nx", 
    "nx_A", "nx2", "nx2_A", "sqrtnxny", "nxny", "nxny_A", "sqrtnxny_A")) 
{
    if (is.null(r)) 
        stop("you must specify a distance range")
    switch(type, nx = abundance.weights.calc(pppx = pppx, r = r, 
        correction = correction), nx_A = abundance.weights.calc(pppx = pppx, 
        Acorr = TRUE, r = r, correction = correction), nx2 = abundance.weights.calc(pppx = pppx, 
        square = TRUE, r = r, correction = correction), nx2_A = ratio.weights.calc(pppx = pppx, 
        pppy = NULL, r = r, correction = correction), sqrtnxny = sqrt(abundance.weights.calc(pppx = pppx, 
        pppy = pppy, square = TRUE, r = r, correction = correction)), 
        nxny = abundance.weights.calc(pppx = pppx, pppy = pppy, 
            square = TRUE, r = r, correction = correction), nxny_A = ratio.weights.calc(pppx = pppx, 
            pppy = pppy, r = r, correction = correction), sqrtnxny_A = sqrt(ratio.weights.calc(pppx = pppx, 
            pppy = pppy, r = r, correction = correction)), stop(paste(type, 
            "is not a valid selection.", "\nChoose from 'nx', 'nx_A','nx2', 'nx2_A','sqrtnxny', 'nxny', 'nxny_A', 'sqrtnxny_A'")))
  }

robertbagchi/ReplicatedPointPatterns documentation built on May 27, 2019, 10:32 a.m.