Learn R Programming

choplump (version 1.1.2)

choplump-package: Permutation Test for Some Positive and Many Zero Responses

Description

This package has basically one important function, choplump for performing the choplump test, which is for comparing two groups with some positive response and many zero responses. These tests can often be more powerful than simpler permutation tests. Exact and approximation methods are available for calculating p-values.

Arguments

Author

Michael P. Fay

Maintainer: Michael P. Fay <mfay@niaid.nih.gov>

Details

Package:choplump
Type:Package
Version:1.1.2
Date:2024-01-25
License:GPL

See example below. There is also two vignettes. The vignette computation (see vignette("choplumpComputation")) gives computational details, and the vignette validation (see vignette("choplumpValidation")) details the way we have validated the function.

References

Follmann, DA, Fay, MP, and Proschan, MA. (2009) ''Chop-lump tests for Vaccine trials'' Biometrics 65: 885-893. (see /doc/choplump.pdf)

Examples

Run this code
set.seed(13921)
Ntotal<-200
Mtotal<-54
Z<-rep(0,Ntotal)
Z[sample(1:Ntotal,Ntotal/2,replace=FALSE)]<-1
test<-data.frame(W=c(rep(0,Ntotal-Mtotal),abs(rnorm(Mtotal))),Z=Z)
## defaults to asymptotic approximation if the number 
## of calculations of the test statistic 
## is >methodRuleParms=10^4
choplump(W~Z,data=test,use.ranks=TRUE,exact=FALSE)

Run the code above in your browser using DataLab