LieberInstitute / jaffelab

R package with commonly used functions by the Jaffe lab
http://lieberinstitute.github.io/jaffelab
7 stars 3 forks source link

Add ANOVA percent of variance explained #5

Open lcolladotor opened 4 years ago

lcolladotor commented 4 years ago

From Andrew:

@lcolladotor can we add the ANOVA % Var Expl to the jaffelab package?

assuming fit is an lm result:

  full = anova(fit)
  fullSS = full$"Sum Sq"
  signif(cbind(full, PctExp = fullSS/sum(fullSS)*100), 3)