/* $Id$
$State$
$Log$
+ Revision 1.332 2022/08/21 09:06:25 brouard
+ Summary: Version 0.99r33
+
+ * 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.331 2022/08/07 05:40:09 brouard
*** empty log message ***
}
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*/
}
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;
}
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 */