sign.boot {equivalence}R Documentation

~~function to do ... ~~

Description

~~ A concise (1-5 lines) description of what the function does. ~~

Usage

sign.boot(x, i, p1 = 0.2, p2 = 0.8)

Arguments

x ~~Describe x here~~
i ~~Describe i here~~
p1 ~~Describe p1 here~~
p2 ~~Describe p2 here~~

Details

~~ If necessary, more details than the description above ~~

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

Warning

....

Note

~~further notes~~

~Make other sections like Warning with section{Warning }{....} ~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(x, i, p1=0.2, p2=0.8)
{
   x <- x[i]
   n <- length(x)

   Nplus <- sum(x > 0)
   Nzero <- sum(x == 0)
   Nminus <- n - Nplus - Nzero
   if(sum(Nzero) > 0) cat("WARNING:", sum(Nzero), "ties occurred.\n")
   S1 <- qbinom(0.95, n, p1)
   S2 <- qbinom(0.05, n, p2)

   result <- sum(Nplus >= S1 & Nplus <= S2)
  }

[Package equivalence version 0.4.1 Index]