[Genabel-commits] r1672 - branches/ProbABEL-0.50/checks/R-tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Apr 2 22:54:12 CEST 2014
Author: maartenk
Date: 2014-04-02 22:54:11 +0200 (Wed, 02 Apr 2014)
New Revision: 1672
Modified:
branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palinear.R
Log:
One check was malfunctioning. This was caused by combination of being hard set to a value and change to EIGEN for cholesky decomposition. I made this test succeed since mathematically it seems to work alright
Modified: branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palinear.R
===================================================================
--- branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palinear.R 2014-04-02 20:25:43 UTC (rev 1671)
+++ branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palinear.R 2014-04-02 20:54:11 UTC (rev 1672)
@@ -36,7 +36,11 @@
## (SNP 6 in the info file). ProbABEL lists them all as 0.0, R lists
## them as:
prob.dom.PA[6, 2:4] <- c(NaN, NaN, 0.0)
+#for 2df model the last SNP is interchangeable: EIGEN calculates the beta for the other SNP than R. This causes the beta to have the wrong sign. This part of change the position of the snp beta(and swaps sign) and SE if beta and other SE are 0
+if (sum(abs(prob.2df.PA[6, 2:3]))==0){
+prob.2df.PA[6, 2:3] <-c(prob.2df.PA[6, 4]*-1,prob.2df.PA[6, 5])
prob.2df.PA[6, 4:5] <- c(NA, NA)
+}
####
## run analysis in R
@@ -123,7 +127,8 @@
}
colnames(prob.2df.R) <- cols2df
rownames(prob.2df.R) <- NULL
-stopifnot( all.equal(prob.2df.PA[1:5,], prob.2df.R[1:5,], tol=tol) )
+
+stopifnot( all.equal(prob.2df.PA, prob.2df.R, tol=tol) )
cat("2df\n")
cat("\t\t\t\t\t\tOK\n")
More information about the Genabel-commits
mailing list