Learn R Programming

cvequality (version 0.2.0)

mslr_test: Modified signed-likelihood ratio test (SLRT) for equality of CVs, using measurement data

Description

Modified signed-likelihood ratio test (SLRT) for equality of CVs, using measurement data

Usage

mslr_test(nr = 1000, x, y, seed)

Arguments

nr

numeric vector length one, number of simulation runs, default is 1e3

x

a numeric vector containing individual measurement values

y

a vector of any type containing a grouping variable

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 Krishnamoorthy, K. & Lee, M. Comput Stat (2014) 29: 215. doi:10.1007/s00180-013-0445-2

Examples

Run this code
# NOT RUN {
 x <- rnorm(100)
 y <- unlist(lapply(letters[1:5], function(i) rep(i, 20)))

 mslr_test(nr = 1e3, x, y)


# }

Run the code above in your browser using DataLab