Learn R Programming

cherry (version 0.6-12)

hommel class: Class "hommel" for storing the adjusted p-values of Hommel's multiple testing method.

Description

The class hommel is the output of a call to hommelFast. It stores the adjusted p-values of all hypotheses.

Arguments

Slots

These slots are not meant to be directly accessed by the user.

pvalues:

Object of class "numeric". Stores original (unadjusted) p-values for all hypotheses.

jvalues:

Object of class "numeric". Stores "jvalues", where each jvalue is the size of the largest intersection hypothesis that cannot be rejected within the closed testing procedure up to the corresponding alpha level that is stored in jumpalpha.

jumpalpha:

Object of class "numeric". Stores the corresponding alpha value for each jvalue.

adjusted:

Object of class "numeric". Stores adjusted p-values for all hypotheses.

simes:

Object of class "logical". Is TRUE if the adjusted p-values are calculated based on Simes' test. Is FALSE if they are based on Hommel's test.

Methods

pvalue

(hommel,indicator): Retrieves adjusted pvalues for all possible hypotheses (as specified by indicator) from the hommel object. If no indicator is given, all adjusted p-values are returned.

See Also

pickSimes, curveSimes.

Examples

Run this code
# NOT RUN {
  
  #Generate a vector of pvalues
  set.seed(1)
  n <- 1000
  pvalues <- c(runif(0.50*n,0,0.001), runif(0.50*n,0,1))
  
  #Create an hommel object in which the adjusted p-values are stored, based on a Simes'test
  #(or Hommel's test, by choosing simes = FALSE):
  hom <- hommelFast(pvalues, simes = TRUE)
  
  #To check how many of the hypotheses within a certain subset have to be false with 95% 
  #confidence, the pickSimes function can be used. If no subset is selected, the whole set of
  #hypotheses is used.  
  pickSimes(hom, alpha=0.05, silent=FALSE)
  
  #The same can be done for any subset, for example the first 10 hypotheses: 
  pickSimes(hom, select=1:10, alpha=0.05, silent=FALSE)
  
  #A plot can be made that displays the results of pickSimes (i.e. the lower confidence bounds)
  #but for selecting only the first 1,2,3,.... hypotheses from the selected set.
  curveSimes(hom, select=1:10, alpha=0.05, plot=FALSE)
    
# }

Run the code above in your browser using DataLab