--- imach/src/imach.c 2022/07/26 17:33:55 1.326 +++ imach/src/imach.c 2022/07/27 17:40:48 1.328 @@ -1,6 +1,12 @@ -/* $Id: imach.c,v 1.326 2022/07/26 17:33:55 brouard Exp $ +/* $Id: imach.c,v 1.328 2022/07/27 17:40:48 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.328 2022/07/27 17:40:48 brouard + Summary: valgrind bug fixed by initializing to zero DummyV as well as Tage + + Revision 1.327 2022/07/27 14:47:35 brouard + Summary: Still a problem for one-step probabilities in case of quantitative variables + Revision 1.326 2022/07/26 17:33:55 brouard Summary: some test with nres=1 @@ -1221,12 +1227,12 @@ typedef struct { #define ODIRSEPARATOR '\\' #endif -/* $Id: imach.c,v 1.326 2022/07/26 17:33:55 brouard Exp $ */ +/* $Id: imach.c,v 1.328 2022/07/27 17:40:48 brouard Exp $ */ /* $State: Exp $ */ #include "version.h" char version[]=__IMACH_VERSION__; char copyright[]="July 2022,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2020, Nihon University 2021-202, INED 2000-2022"; -char fullversion[]="$Revision: 1.326 $ $Date: 2022/07/26 17:33:55 $"; +char fullversion[]="$Revision: 1.328 $ $Date: 2022/07/27 17:40:48 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -6968,7 +6974,9 @@ To be simple, these graphs help to under cov[2+nagesqr+Tage[k]]=nbcode[Tvar[Tage[k]]][codtabm(j1,k)]*cov[2]; /* cov[++k1]=nbcode[Tvar[Tage[k]]][codtabm(ij,k)]*cov[2]; */ } else if(Dummy[Tage[k]]==3){ /* quantitative with age */ - cov[2+nagesqr+Tage[k]]=Tqresult[nres][k]; + printf("Internal IMaCh error, don't know which value for quantitative covariate with age, Tage[k]%d, k=%d, Tvar[Tage[k]]=V%d, age=%d\n",Tage[k],k ,Tvar[Tage[k]], (int)cov[2]); + exit(1); + /* cov[2+nagesqr+Tage[k]]=meanq[k]/idq[k]*cov[2];/\* Using the mean of quantitative variable Tvar[Tage[k]] /\* Tqresult[nres][k]; *\/ */ /* cov[++k1]=Tqresult[nres][k]; */ } /* cov[2+Tage[k]+nagesqr]=nbcode[Tvar[Tage[k]]][codtabm(ij,k)]*cov[2]; */ @@ -9595,6 +9603,10 @@ int readdata(char datafile[], int firsto DummyV=ivector(1,NCOVMAX); /* 1 to 3 */ FixedV=ivector(1,NCOVMAX); /* 1 to 3 */ + for(v=1;v