gofsimpt: Establishing goodness of fit of an observed to a fully...

Description Usage Arguments Value Author(s) References Examples

View source: R/gofsimpt.R

Description

The function computes all quantities required for carrying out the asymptotic test for goodness rather than lack of fit of an observed to a fully specified multinomial distribution derived in Par. 9.1 of Wellek S (2010) Testing statistical hypotheses of equivalence and noninferiority. Second edition.

Usage

1
gofsimpt(alpha,n,k,eps,x,pio) 

Arguments

alpha

significance level

n

sample size

k

number of categories

eps

margin to the Euclidean distance between the vectors \mathbf{π} and \mathbf{π}_0 of true and hypothesized cell probabilities

x

vector of length k with the observed cell counts as components

pio

prespecified vector of cell probabilities

Value

alpha

significance level

n

sample size

k

number of categories

eps

margin to the Euclidean distance between the vectors \mathbf{π} and \mathbf{π}_0 of true and hypothesized cell probabilities

X(1,K)

observed cell counts

PI0(1,K)

hypothecized cell probabilities

DSQPIH_0

observed value of the squared Euclidean distance

VN_N

square root of the estimated asymtotic variance of √{n}DSQPIH\_0

CRIT

upper critical bound to √{n}DSQPIH\_0

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.1.

Examples

1
2
3
x<- c(17,16,25,9,16,17)
pio <- rep(1,6)/6
gofsimpt(0.05,100,6,0.15,x,pio)

Example output

Loading required package: BiasedUrn
  n = 100  alpha = 0.05   eps = 0.15    x(1,K) = 17 16 25 9 16 17   pio(1,K) = 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667    DSQPIH_0 = 0.01293333   VN_N = 0.009199652   CRIT = 0.007367919   REJ = 0

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