Learn R Programming

RDM (version 0.1.1)

checkerboardDensityIndex: Estimate a single entry of the checkerboard mass density

Description

Estimate the value \(A_{kl}\) of the non-square checkerboard mass density.

Usage

checkerboardDensityIndex(X, Y, k, l, resolution1, resolution2)

Value

The estimated checkerboard mass density \(A_{kl}\).

Arguments

X

First coordinate of the observations.

Y

Second coordinate of the observations.

k

Index of the first component.

l

Index of the second component.

resolution1

A natural number specifying the resolution of the first component.

resolution2

A natural number specifying the resolution of the second component.

Details

This implementation modifies the code of build_checkerboard_weights() published in 'qad', version 1.0.4, available at https://CRAN.R-project.org/package=qad, to allow for the evaluation of a single index of the non-square checkerboard mass densities. For more details on the implementation see ECBC and for more information on the implemented changes, see the file 'src/code.cpp'.

Examples

Run this code
U <- runif(20)
V <- runif(20)
checkerboardDensity(U, V, 3, 3)
checkerboardDensityIndex(U, V, 1, 2, 3, 3)

Run the code above in your browser using DataLab