version 1.209, 2015/11/17 22:12:03
|
version 1.210, 2015/11/18 17:41:20
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
Revision 1.210 2015/11/18 17:41:20 brouard |
|
Summary: Start working on projected prevalences |
|
|
Revision 1.209 2015/11/17 22:12:03 brouard |
Revision 1.209 2015/11/17 22:12:03 brouard |
Summary: Adding ftolpl parameter |
Summary: Adding ftolpl parameter |
Author: N Brouard |
Author: N Brouard |
Line 3221 void freqsummary(char fileres[], int ia
|
Line 3224 void freqsummary(char fileres[], int ia
|
k2cpt=0; |
k2cpt=0; |
for (i=1; i<=imx; i++) { |
for (i=1; i<=imx; i++) { |
bool=1; |
bool=1; |
if (cptcovn>0) { /* Filter is here: Must be looked at for model=V1+V2+V3+V4 */ |
if (cptcovn>0) { /* Filter is here: Must be looked at for model=V1+V2+V3+V4 */ |
for (z1=1; z1<=cptcoveff; z1++) |
for (z1=1; z1<=cptcoveff; z1++) |
if (covar[Tvaraff[z1]][i]!= nbcode[Tvaraff[z1]][codtabm(j1,z1)]){ |
if (covar[Tvaraff[z1]][i]!= nbcode[Tvaraff[z1]][codtabm(j1,z1)]){ |
/* Tests if the value of each of the covariates of i is equal to filter j1 */ |
/* Tests if the value of each of the covariates of i is equal to filter j1 */ |
Line 3231 void freqsummary(char fileres[], int ia
|
Line 3234 void freqsummary(char fileres[], int ia
|
j1,z1,nbcode[Tvaraff[z1]][codtabm(j1,z1)],j1);*/ |
j1,z1,nbcode[Tvaraff[z1]][codtabm(j1,z1)],j1);*/ |
/* For j1=7 in V1+V2+V3+V4 = 0 1 1 0 and codtabm(7,3)=1 and nbcde[3][?]=1*/ |
/* For j1=7 in V1+V2+V3+V4 = 0 1 1 0 and codtabm(7,3)=1 and nbcde[3][?]=1*/ |
} |
} |
} |
} /* cptcovn > 0 */ |
|
|
if (bool==1){ |
if (bool==1){ |
for(m=firstpass; m<=lastpass; m++){ |
for(m=firstpass; m<=lastpass; m++){ |
Line 3245 void freqsummary(char fileres[], int ia
|
Line 3248 void freqsummary(char fileres[], int ia
|
freq[s[m][i]][s[m+1][i]][iagemax+3] += weight[i]; |
freq[s[m][i]][s[m+1][i]][iagemax+3] += weight[i]; |
} |
} |
|
|
if ((agev[m][i]>1) && (agev[m][i]< (iagemax+3))) { |
if ((agev[m][i]>1) && (agev[m][i]< (iagemax+3)) && (anint[m][i]!=9999) && (mint[m][i]!=99)) { |
dateintsum=dateintsum+k2; |
dateintsum=dateintsum+k2; |
k2cpt++; |
k2cpt++; |
|
/* printf("i=%ld dateintmean = %lf dateintsum=%lf k2cpt=%lf k2=%lf\n",i, dateintsum/k2cpt, dateintsum,k2cpt, k2); */ |
} |
} |
/*}*/ |
/*}*/ |
} |
} /* end m */ |
} |
} /* end bool */ |
} /* end i */ |
} /* end i = 1 to imx */ |
|
|
/* fprintf(ficresp, "#Count between %.lf/%.lf/%.lf and %.lf/%.lf/%.lf\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2);*/ |
/* fprintf(ficresp, "#Count between %.lf/%.lf/%.lf and %.lf/%.lf/%.lf\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2);*/ |
pstamp(ficresp); |
pstamp(ficresp); |
Line 3338 void freqsummary(char fileres[], int ia
|
Line 3342 void freqsummary(char fileres[], int ia
|
if(first==1) |
if(first==1) |
printf("Others in log...\n"); |
printf("Others in log...\n"); |
fprintf(ficlog,"\n"); |
fprintf(ficlog,"\n"); |
} |
} /* end loop i */ |
/*}*/ |
/*}*/ |
} |
} /* end j1 */ |
dateintmean=dateintsum/k2cpt; |
dateintmean=dateintsum/k2cpt; |
|
|
fclose(ficresp); |
fclose(ficresp); |
Line 4973 void printinggnuplot(char fileresu[], ch
|
Line 4977 void printinggnuplot(char fileresu[], ch
|
/*#endif */ |
/*#endif */ |
m=pow(2,cptcoveff); |
m=pow(2,cptcoveff); |
|
|
|
/* Projected Prevalences */ |
|
/* plot "NAGI0w_V1V2_monthlyb2b-proj/F_NAGI0w_V1V2_monthlyb2b-proj.txt" u 6:((($1 == 1) && ($2==0) && ($3==2) &&($4==0))? $7/(1-$13):1/0) t 'p11' w line */ |
|
/* replot "" u 6:((($1 == 1) && ($2==0) && ($3==2) &&($4==0))? $8/(1-$14):1/0) t 'p21' w line */ |
|
/* replot "" u 6:((($1 == 1) && ($2==0) && ($3==2) &&($4==0)&&($9!=0))? $9/(1-$15):1/0) t 'p.1' w line */ |
|
|
/* Contribution to likelihood */ |
/* Contribution to likelihood */ |
/* Plot the probability implied in the likelihood */ |
/* Plot the probability implied in the likelihood */ |
fprintf(ficgp,"\n# Contributions to the Likelihood, mle >=1. For mle=4 no interpolation, pure matrix products.\n#\n"); |
fprintf(ficgp,"\n# Contributions to the Likelihood, mle >=1. For mle=4 no interpolation, pure matrix products.\n#\n"); |