varshannonZ {SpatEntropy}R Documentation

Estimated variance of Shannon's entropy of ZZ.

Description

This function estimates the variance of Shannon's entropy of ZZ, where ZZ identifies pairs of categories of the original study variable.

Usage

varshannonZ(data)

Arguments

data

A data matrix or vector, can be numeric, factor, character, ... Alternatively, a marked ppp object.

Details

varshannonZ estimates the variance of the maximum likelihood estimator of Shannon's entropy of ZZ given by shannonZ. The variance is

V(H(Z))=H(Z)2H(Z)2V(H(Z))=H(Z)_2- H(Z)^2

, where

H(Z)2=p(zr)log(1/p(zr))2H(Z)_2=\sum p(z_r)\log(1/p(z_r))^2

. The function is able to work with lattice data with missing data, as long as they are specified as NAs: missing data are ignored in the computations.

Value

the estimated variance of Shannon's entropy of ZZ.

Examples

#NON SPATIAL DATA
data=sample(1:5, 50, replace=TRUE)
varshannonZ(data)

#POINT DATA
data.pp=runifpoint(100, win=square(10))
marks(data.pp)=sample(c("a","b","c"), 100, replace=TRUE)
varshannonZ(marks(data.pp))

#LATTICE DATA
data.lat=matrix(sample(c("a","b","c"), 100, replace=TRUE), nrow=10)
varshannonZ(data.lat)


[Package SpatEntropy version 2.2-4 Index]