version 1.332, 2022/08/21 09:06:25
|
version 1.333, 2022/08/21 09:10:30
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
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 |
Revision 1.332 2022/08/21 09:06:25 brouard |
Summary: Version 0.99r33 |
Summary: Version 0.99r33 |
|
|
Line 10320 int decoderesult( char resultline[], int
|
Line 10339 int decoderesult( char resultline[], int
|
} |
} |
if(match == 0){ |
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]); |
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; |
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*/ |
}else if(Typevar[k1]==2){ /* Product No age We want to get the position in the resultline of the product in the model line*/ |
Line 10336 int decoderesult( char resultline[], int
|
Line 10355 int decoderesult( char resultline[], int
|
} |
} |
if(match == 0){ |
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); |
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; |
return 1; |
} |
} |
match=0; |
match=0; |
Line 10350 int decoderesult( char resultline[], int
|
Line 10369 int decoderesult( char resultline[], int
|
} |
} |
if(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); |
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; |
return 1; |
} |
} |
}/* End of testing */ |
}/* End of testing */ |
}/* End loop cptcovt |
}/* End loop cptcovt */ |
/* Checking for missing or useless values in comparison of current model needs */ |
/* 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 */ |
/* 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 */ |
for(k2=1; k2 <=j;k2++){ /* Loop on resultline variables: result line V4=1 V5=24.1 V3=1 V2=8 V1=0 */ |