varshannonZ | R Documentation |
Z
.This function estimates the variance of Shannon's entropy of Z
, where Z
identifies pairs of categories of the original study variable.
varshannonZ(data)
data |
A data matrix or vector, can be numeric, factor, character, ...
Alternatively, a marked |
varshannonZ estimates the
variance of the maximum likelihood estimator of Shannon's entropy of Z
given by
shannonZ. The variance is
V(H(Z))=H(Z)_2- H(Z)^2
, where
H(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.
the estimated variance of Shannon's entropy of Z
.
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.