mslr_test2: # Modified signed-likelihood ratio test (SLRT) for equality...

Description Usage Arguments Value References Examples

View source: R/functions.R

Description

# Modified signed-likelihood ratio test (SLRT) for equality of CVs, using summary statistics when raw measurement data are not available.

Usage

1
mslr_test2(nr, n, x, s, seed)

Arguments

nr

numeric vector lenght one, number of simulation runs

n

a numeric vector, the number of observations in each group

x

a numeric vector, the mean of each group

s

a numeric vector, the standard deviation of each group

seed

optional, an integer that is the starting point used in the generation of a sequence of random numbers. Include a seed if you want reproducible output.

Value

a list with the test statistic and p-value

References

http://link.springer.com/article/10.1007/s00180-013-0445-2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Summary stats from Feltz and Miller 1996

miller <- data.frame(test = c('ELISA', 'WEHI', '`Viral inhibition`'),
                    Mean = c(6.8, 8.5, 6.0),
                    CV =   c(0.090, 0.462, 0.340),
                    N =    c(5, 5, 5))
# compute SD from mean and cv
miller$SD <- with(miller, CV * Mean)

 mslr_test2(nr = 1e3, n = miller$N, s = miller$SD, x = miller$Mean)

benmarwick/cvequality documentation built on Nov. 7, 2019, 10:37 a.m.