View source: R/NNCTFunctions.r
EV.Nii | R Documentation |
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).
EV.Nii(ct)
ct |
The NNCT or SCCT |
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
scct
and EV.nnct
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.