False Discovery Rate Algorithm

Calculate adjusted p values using False Discovery Rate Controlling Procedures.

FDR Algorithm

predefined values: subSize of data, number of permutation
  1. calculate raw T -- T value
  2. ref.vector -- construct refernece |t| vector ( suggested by author, user may prefer to construct the vector directly)
    • interval.length.vector = (3,3,4)
    • dense.ratio.vector =( 1,6,3)
    • max.ref.vector = sum of interval.length.vector
    • interval.num.element.vector = dense.ratio.vector * (sub.size/sum of dense.ratio.vector)))
    • from.vector = length of dense.ratio.vector
    • to.vector = length of dense.ratio.vector
    • for ( i=1 to length of dense.ratio.vector)
      1. if i =1 then
        ref.vector = sequence (max.ref.vector, max.ref.vector-interval.length.vector[1], interval.num.element.vector[1])
      2. else
        ref.vector = sequence ( to.vector[i-1]-((to.vector[i-1]-to.vector[i])/interval.num.element.vector[i]),
        to.vector[i-1]-interval.length.vector[i],
        interval.num.element.vector[i])
  3. generate permutation data sets
    Randomly regrouping each gene. The size in each group stays the same as the original, each sample can only appare once in each group, number of regrouping depends on user
  4. calculate t.array -- calculate T values based on permutation data sets
  5. calculate r.vector
    • for ( i=0 to subSize)
      • for ( j=0 to total number of gene)
        count++ if abs(raw T) > ref.vector[i]
        r.vector[i] = count++
  6. calculate v.array
    • for ( i=0 to permutation nubmer)
      • for ( j=0 to subSize)
        • for ( k=0 to geneRows)
          count++ if abs(t.array[i,j]) > ref.vector[i]
          v.array[i,j] = count
  7. calculate est.mean.exc
    • for ( i=0 to subSize)
      est.mean.exc[i] = mean of v.array[i]
  8. calculate est.95qu.exc
    • for ( i=0 to subSize)
      est.95qu.exc[i] = 95% quantile of v.array[i]
  9. calculate s.hat
    • for ( i=0 to subSize)
      s.hat[i] = r.vector[i] - est.mean.exc[i]
    • for ( i=0 to subSize)
      if s.hat[i] < est.95qu.exc[i] then s.hat[i] = 0
  10. calculate q.array
    • for ( i=0 to number of permutaiton)
      • for ( j=0 to subSize)
        q.array[i,j] = v.array[i,j]/(v.array[i,j]-0.0001+s.hat[j])
  11. calculate q.value
    • for ( i=0 to number of permutaiton)
      • for ( j=0 to subsize)
        q.value[i] = mean of q.array[i,j)

Topic revision: r6 - 09 Dec 2004, WillGray
 

This site is powered by FoswikiCopyright © 2013-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback