Skip to content

Instantly share code, notes, and snippets.

@rtirrell
Created August 4, 2010 03:44
Show Gist options
  • Save rtirrell/507601 to your computer and use it in GitHub Desktop.
Save rtirrell/507601 to your computer and use it in GitHub Desktop.
def self.correct_correlations(klass, method)
all = CLASSES[klass].all(:method => method)
p_values = $r.p_adjust(all.map {|c| c.p_value}, {:method => "holm"})
all.each_index do |i|
all[i].update :adjusted_p_value => p_values[i]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment