--- imach/src/imach.c 2022/08/21 09:06:25 1.332 +++ imach/src/imach.c 2022/08/21 09:10:30 1.333 @@ -1,6 +1,25 @@ -/* $Id: imach.c,v 1.332 2022/08/21 09:06:25 brouard Exp $ +/* $Id: imach.c,v 1.333 2022/08/21 09:10:30 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.333 2022/08/21 09:10:30 brouard + * src/imach.c (Module): Version 0.99r33 A lot of changes in + reassigning covariates: my first idea was that people will always + use the first covariate V1 into the model but in fact they are + producing data with many covariates and can use an equation model + with some of the covariate; it means that in a model V2+V3 instead + of codtabm(k,Tvaraff[j]) which calculates for combination k, for + three covariates (V1, V2, V3) the value of Tvaraff[j], but in fact + the equation model is restricted to two variables only (V2, V3) + and the combination for V2 should be codtabm(k,1) instead of + (codtabm(k,2), and the code should be + codtabm(k,TnsdVar[Tvaraff[j]]. Many many changes have been + made. All of these should be simplified once a day like we did in + hpxij() for example by using precov[nres] which is computed in + decoderesult for each nres of each resultline. Loop should be done + on the equation model globally by distinguishing only product with + age (which are changing with age) and no more on type of + covariates, single dummies, single covariates. + Revision 1.332 2022/08/21 09:06:25 brouard Summary: Version 0.99r33 @@ -1259,12 +1278,12 @@ typedef struct { #define ODIRSEPARATOR '\\' #endif -/* $Id: imach.c,v 1.332 2022/08/21 09:06:25 brouard Exp $ */ +/* $Id: imach.c,v 1.333 2022/08/21 09:10:30 brouard Exp $ */ /* $State: Exp $ */ #include "version.h" char version[]=__IMACH_VERSION__; char copyright[]="August 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.332 $ $Date: 2022/08/21 09:06:25 $"; +char fullversion[]="$Revision: 1.333 $ $Date: 2022/08/21 09:10:30 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -10320,7 +10339,7 @@ int decoderesult( char resultline[], int } if(match == 0){ printf("Error in result line (Product with age): V%d is missing in result: %s according to model=%s (Tvarsel[k2=%d]=%d)\n",Tvar[k1], resultline, model, k2, Tvarsel[k2]); - fprintf(ficlog,"Error in result line (Product with age): V%d is missing in result: %s according to model=%s\n",Tvar[k1], resultline, model, k2, Tvarsel[k2]); + fprintf(ficlog,"Error in result line (Product with age): V%d is missing in result: %s according to model=%s (Tvarsel[k2=%d]=%d)\n",Tvar[k1], resultline, model, k2, Tvarsel[k2]); return 1; } }else if(Typevar[k1]==2){ /* Product No age We want to get the position in the resultline of the product in the model line*/ @@ -10336,7 +10355,7 @@ int decoderesult( char resultline[], int } if(match == 0){ printf("Error in result line (Product without age first variable): V%d is missing in result: %s according to model=%s\n",Tvardk[k1][1], resultline, model); - fprintf(ficlog,"Error in result line (Product without age first variable): V%d is missing in result: %s according to model=%s\n",k1,Tvardk[k1][1], resultline, model); + fprintf(ficlog,"Error in result line (Product without age first variable): V%d is missing in result: %s according to model=%s\n",Tvardk[k1][1], resultline, model); return 1; } match=0; @@ -10350,11 +10369,11 @@ int decoderesult( char resultline[], int } if(match == 0){ printf("Error in result line (Product without age second variable): V%d is missing in result: %s according to model=%s\n",Tvardk[k1][2], resultline, model); - fprintf(ficlog,"Error in result line (Product without age second variable): V%d is missing in result : %s according to model=%s\n",k1,Tvardk[k1][2], resultline, model); + fprintf(ficlog,"Error in result line (Product without age second variable): V%d is missing in result : %s according to model=%s\n",Tvardk[k1][2], resultline, model); return 1; } }/* End of testing */ - }/* End loop cptcovt + }/* End loop cptcovt */ /* Checking for missing or useless values in comparison of current model needs */ /* Feeds resultmodel[nres][k1]=k2 for single covariate (k1) in the model equation */ for(k2=1; k2 <=j;k2++){ /* Loop on resultline variables: result line V4=1 V5=24.1 V3=1 V2=8 V1=0 */