[Genabel-commits] r1680 - branches/ProbABEL-pvals/ProbABEL/checks/R-tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Apr 7 17:17:31 CEST 2014
Author: lckarssen
Date: 2014-04-07 17:17:31 +0200 (Mon, 07 Apr 2014)
New Revision: 1680
Modified:
branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_model_linear.R
Log:
Added calculation of p-value based on the LRT chi^2 to the palinear-R comparison.
Work in progress.
Modified: branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_model_linear.R
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_model_linear.R 2014-04-07 14:36:38 UTC (rev 1679)
+++ branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_model_linear.R 2014-04-07 15:17:31 UTC (rev 1680)
@@ -17,11 +17,12 @@
}
lrt <- 2 * ( logLik( model ) - logLik( model.0 ) )
+ pval <- pchisq(lrt, 1, lower.tail=FALSE)
rsq <- Rsq[i-2]
if( rsq < rsq.thresh) {
- row <- c(rsq, NaN, NaN, NaN)
+ row <- c(rsq, NaN, NaN, NaN, NaN)
} else {
- row <- c(rsq, sm[1], sm[2], lrt)
+ row <- c(rsq, sm[1], sm[2], lrt, pval)
}
resultR <- rbind(resultR, row)
}
More information about the Genabel-commits
mailing list