funsZcell.nnct.pval: p-values for Cell-specific Z Test Statistics for NNCT

funsZcell.nnct.pvalR Documentation

p-values for Cell-specific Z Test Statistics for NNCT

Description

Four functions: Zcell.nnct.2s, Zcell.nnct.rs, Zcell.nnct.ls and Zcell.nnct.pval.

These functions yield a contingency table (i.e., a matrix) of the p-values for the cell-specific Z test statistics for the NNCT and take the cell-specific Z test statistics in matrix form as their argument. Zcell.nnct.pval yields an array of size k \times k \times 3 where 1st entry of the array is the matrix of p-values for the two-sided alternative, 2nd entry of the array is the matrix of p-values for the left-sided alternative and 3rd entry of the array is the matrix of p-values for the right-sided alternative. And each of Zcell.nnct.2s, Zcell.nnct.rs and Zcell.nnct.ls yield a k \times k matrix of p-values for the two-sided, right-sided and left-sided alternative, respectively.

The functions Zcell.nnct.2s, Zcell.nnct.rs and Zcell.nnct.ls are equivalent to Zcell.nnct(...,alt)$p.val where alt="two-sided", "greater" and "less", respectively, with the appropriate arguments for the function Zcell.nnct (see the examples below).

See also (\insertCitedixon:1994,dixon:NNCTEco2002,ceyhan:eest-2010;textualnnspat).

Usage

Zcell.nnct.pval(zt)

Zcell.nnct.2s(zt)

Zcell.nnct.ls(zt)

Zcell.nnct.rs(zt)

Arguments

zt

A k \times k matrix of the cell-specific Z test statistics

Value

Zcell.nnct.pval returns a k \times k \times 3 array whose 1st entry is the matrix of p-values for the two-sided alternative, 2nd entry is the matrix of p-values for the left-sided alternative and 3rd entry is the matrix of p-values for the right-sided alternative Zcell.nnct.2s returns a k \times k matrix of p-values for the two-sided alternative Zcell.nnct.rs returns a k \times k matrix of p-values for the right-sided alternative Zcell.nnct.ls returns a k \times k matrix of p-values for the left-sided alternative

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

Zcell.nnct and Zcell.nnct.ct

Examples

n<-20  #or try sample(1:20,1)
Y<-matrix(runif(3*n),ncol=3)
cls<-sample(1:2,n,replace = TRUE)  #or try cls<-rep(1:2,c(10,10))
TS<-Zcell.nnct(Y,cls)$statistic
TS
pv<-Zcell.nnct.pval(TS)
pv

Zcell.nnct(Y,cls,alt="t")$p.val
Zcell.nnct(Y,cls,alt="l")$p.val
Zcell.nnct(Y,cls,alt="g")$p.val

Zcell.nnct.2s(TS)

Zcell.nnct.ls(TS)

Zcell.nnct.rs(TS)


nnspat documentation built on May 29, 2024, 10:03 a.m.