gofind_t: Establishing approximate independence in a two-way...

Description Usage Arguments Value Author(s) References Examples

View source: R/gofind_t.R

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

1
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

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

Example output

Loading required package: BiasedUrn
 n = 120   alpha = 0.05   eps = 0.15   r = 2   s = 4   X(r,s) : 8 13 15 6 19 21 31 7   DSQ_OBS = 0.0009201389   VN = 0.01918986   CRIT = 0.01961857   REJ = 1

EQUIVNONINF documentation built on July 12, 2021, 5:08 p.m.