[Genabel-commits] r852 - pkg/ProbABEL/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Mar 18 11:00:42 CET 2012
Author: lckarssen
Date: 2012-03-18 11:00:42 +0100 (Sun, 18 Mar 2012)
New Revision: 852
Modified:
pkg/ProbABEL/src/reg1.h
Log:
Fix for bug #1889 (different results for mmscore on 32/64bit Linux).
The various regression functions expected a pointer to the invvarmatrix (pass by reference), but they got the matrix itself (passed by value). Now the functions simply expect the matrix to be passed by value. This may not be the smartest solution for large matrices. That needs to be tested.
Modified: pkg/ProbABEL/src/reg1.h
===================================================================
--- pkg/ProbABEL/src/reg1.h 2012-03-18 09:44:17 UTC (rev 851)
+++ pkg/ProbABEL/src/reg1.h 2012-03-18 10:00:42 UTC (rev 852)
@@ -341,7 +341,7 @@
//
// }
void estimate(regdata &rdatain,int verbose, double tol_chol, int model, int interaction,
- int ngpreds, mematrix<double> & invvarmatrixin, int robust, int nullmodel=0)
+ int ngpreds, mematrix<double> invvarmatrixin, int robust, int nullmodel=0)
{
//suda ineraction parameter
// model should come here
@@ -550,7 +550,7 @@
if (verbose) {printf("sebeta (%d):\n",sebeta.nrow);sebeta.print();}
}
- void score(mematrix<double> &resid,regdata &rdatain,int verbose, double tol_chol, int model, int interaction, int ngpreds, mematrix<double> & invvarmatrix, int nullmodel=0)
+ void score(mematrix<double> &resid,regdata &rdatain,int verbose, double tol_chol, int model, int interaction, int ngpreds, mematrix<double> invvarmatrix, int nullmodel=0)
{
regdata rdata = rdatain.get_unmasked_data();
@@ -639,7 +639,7 @@
}
void estimate(regdata &rdatain, int verbose, int maxiter, double eps, double tol_chol,
- int model, int interaction, int ngpreds, mematrix<double> & invvarmatrixin, int robust,
+ int model, int interaction, int ngpreds, mematrix<double> invvarmatrixin, int robust,
int nullmodel=0)
{
// on the contrast to the 'linear' 'invvarmatrix' contains
@@ -831,7 +831,7 @@
//exit(1);
}
// just a stupid copy from linear_reg
- void score(mematrix<double> &resid,regdata &rdata,int verbose, double tol_chol, int model, int interaction, int ngpreds, mematrix<double> & invvarmatrix, int nullmodel=0)
+ void score(mematrix<double> &resid,regdata &rdata,int verbose, double tol_chol, int model, int interaction, int ngpreds, mematrix<double> invvarmatrix, int nullmodel=0)
{
mematrix<double> oX = rdata.extract_genotypes();
mematrix<double> X = apply_model(oX,model, interaction, ngpreds, false, nullmodel);
More information about the Genabel-commits
mailing list