--- imach/src/imach.c 2016/08/30 15:01:20 1.242 +++ imach/src/imach.c 2016/09/02 06:45:35 1.243 @@ -1,6 +1,9 @@ -/* $Id: imach.c,v 1.242 2016/08/30 15:01:20 brouard Exp $ +/* $Id: imach.c,v 1.243 2016/09/02 06:45:35 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.243 2016/09/02 06:45:35 brouard + *** empty log message *** + Revision 1.242 2016/08/30 15:01:20 brouard Summary: Fixing a lots @@ -928,12 +931,12 @@ typedef struct { #define ODIRSEPARATOR '\\' #endif -/* $Id: imach.c,v 1.242 2016/08/30 15:01:20 brouard Exp $ */ +/* $Id: imach.c,v 1.243 2016/09/02 06:45:35 brouard Exp $ */ /* $State: Exp $ */ #include "version.h" char version[]=__IMACH_VERSION__; char copyright[]="February 2016,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2018"; -char fullversion[]="$Revision: 1.242 $ $Date: 2016/08/30 15:01:20 $"; +char fullversion[]="$Revision: 1.243 $ $Date: 2016/09/02 06:45:35 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -2222,7 +2225,8 @@ void powell(double p[], double **xi, int /* printf("\n"); */ /* fprintf(ficlog,"\n"); */ } - if (2.0*fabs(fp-(*fret)) <= ftol*(fabs(fp)+fabs(*fret))) { /* Did we reach enough precision? */ + /* if (2.0*fabs(fp-(*fret)) <= ftol*(fabs(fp)+fabs(*fret))) { /\* Did we reach enough precision? *\/ */ + if (2.0*fabs(fp-(*fret)) <= ftol) { /* Did we reach enough precision? */ /* We could compare with a chi^2. chisquare(0.95,ddl=1)=3.84 */ /* By adding age*age in a model, the new -2LL should be lower and the difference follows a */ /* a chisquare statistics with 1 degree. To be significant at the 95% level, it should have */ @@ -3213,7 +3217,7 @@ double func( double *x) Then computes with function pmij which return a matrix p[i][j] giving the elementary probability to be observed in j being in i according to the model. */ - ioffset=2+nagesqr+cptcovage; + ioffset=2+nagesqr ; /* Fixed */ for (k=1; k<=ncovf;k++){ /* Simple and product fixed covariates without age* products */ cov[ioffset+TvarFind[k]]=covar[Tvar[TvarFind[k]]][i];/* V5+V4+V3+V4*V3+V5*age+V2+V1*V2+V1*age+V1, only V1 is fixed (k=6)*/ @@ -3532,7 +3536,8 @@ double funcone( double *x) for(k=1; k<=nlstate; k++) ll[k]=0.; ioffset=0; for (i=1,ipmx=0, sw=0.; i<=imx; i++){ - ioffset=2+nagesqr+cptcovage; + /* ioffset=2+nagesqr+cptcovage; */ + ioffset=2+nagesqr; /* Fixed */ /* for (k=1; k<=cptcovn;k++) cov[2+nagesqr+k]=covar[Tvar[k]][i]; */ /* for (k=1; k<=ncoveff;k++){ /\* Simple and product fixed Dummy covariates without age* products *\/ */