# EV.Nii: Expected Values of the Self Entries in a Species... In nnspat: Nearest Neighbor Methods for Spatial Patterns

## Description

Returns a `vector` of length k of expected values of the self entries (i.e. first column) in a species correspondence contingency table (SCCT) or the expected values of the diagonal entries N_{ii} in an NNCT. These expected values are valid under RL or CSR.

The argument `ct` can be either the NNCT or SCCT.

See also (\insertCiteceyhan:NNCorrespond2018;textualnnspat).

## Usage

 `1` ```EV.Nii(ct) ```

## Arguments

 `ct` The NNCT or SCCT

## Value

A `vector` of length k whose entries are the expected values of the self entries (i.e. first column) in a species correspondence contingency table (SCCT) or of the diagonal entries in an NNCT.

Elvan Ceyhan

\insertAllCited

## See Also

`scct` and `EV.nnct`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28``` ```n<-20 #or try sample(1:20,1) Y<-matrix(runif(3*n),ncol=3) ipd<-ipd.mat(Y) cls<-sample(1:2,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10)) ct<-nnct(ipd,cls) ct EV.Nii(ct) ct<-scct(ipd,cls) EV.Nii(ct) #cls as a factor na<-floor(n/2); nb<-n-na fcls<-rep(c("a","b"),c(na,nb)) ct<-nnct(ipd,fcls) EV.Nii(ct) ############# n<-40 Y<-matrix(runif(3*n),ncol=3) ipd<-ipd.mat(Y) cls<-sample(1:4,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10)) ct<-nnct(ipd,cls) EV.Nii(ct) ct<-scct(ipd,cls) EV.Nii(ct) ```

nnspat documentation built on May 10, 2021, 9:06 a.m.