chi.stat: chi.stat function

Description Usage Arguments Details Value References Examples

View source: R/Main.R

Description

This function calculates the $M$ statistics value as defined in the reference paper.

Usage

1
chi.stat(ftab)

Arguments

ftab

it is a matrix with dimension 2 by K.

Details

The M statistics is defined as:

M=∑_{l=1}^{K}≤ft(\frac{(O_{x,l}-E_{x,l})^2}{E_{x,l}}+\frac{(O_{x,l}-E_{x,l})^2}{≤ft(n_ln_{l+1}-E_{x,l}\right)}\right)+∑_{l=1}^{K}≤ft(\frac{(O_{y,l}-E_{y,l})^2}{E_{y,l}}+\frac{(O_{y,l}-E_{y,l})^2}{≤ft(m_lm_{l+1}-E_{y,l}\right)}\right).

Value

chi.val, a chisuqre type of statistics value

References

Wang, Y., Stapleton, A. E., & Chen, C. (2018). Two-sample nonparametric stochastic order inference with an application in plant physiology. Journal of Statistical Computation and Simulation, 88(14), 2668-2683.

Examples

1
chi.stat(ftab=rbind(c(20,10,20),c(15,15,20)))

Trendtwosub documentation built on Feb. 9, 2021, 1:06 a.m.