gofind_t {EQUIVNONINF}R Documentation

Establishing approximate independence in a two-way contingency table: Test statistic and critical bound

Description

The function computes all quantities required for carrying out the asymptotic test for approximate independence of two categorial variables derived in Par. 9.2 of Wellek S (2010) Testing statistical hypotheses of equivalence and noninferiority. Second edition.

Usage

gofind_t(alpha,r,s,eps,xv) 

Arguments

alpha

significance level

r

number of rows of the contingency table under analysis

s

number of columns of the contingency table under analysis

eps

margin to the Euclidean distance between the vector \mathbf{π} of true cell probabilities and the associated vector of products of marginal totals

xv

row vector of length r * s whose (i-1)s + j-th component is the entry in cell (i,j) of the r * s contingency table under analysis i=1,…,r, j=1,…,s.

Value

n

size of the sample to which the input table relates

alpha

significance level

r

number of rows of the contingency table under analysis

s

number of columns of the contingency table under analysis

eps

margin to the Euclidean distance between the vector \mathbf{π} of true cell probabilities and the associated vector of products of marginal totals

X(r,s)

observed cell counts

DSQ_OBS

observed value of the squared Euclidean distance

VN

square root of the estimated asymtotic variance of √{n}DSQ\_OBS

CRIT

upper critical bound to √{n}DSQ\_OBS

REJ

indicator of a positive [=1] vs negative [=0] rejection decision to be taken with the data under analysis

Author(s)

Stefan Wellek <stefan.wellek@zi-mannheim.de>
Peter Ziegler <peter.ziegler@zi-mannheim.de>

References

Wellek S: Testing statistical hypotheses of equivalence and noninferiority. Second edition. Boca Raton: Chapman & Hall/CRC Press, 2010, Par. 9.2.

Examples

xv <- c(8, 13, 15, 6,  19, 21, 31, 7) 
gofind_t(0.05,2,4,0.15,xv)

[Package EQUIVNONINF version 1.0.2 Index]