Diff for /imach/src/imach.c between versions 1.69 and 1.70

version 1.69, 2003/02/04 20:55:29 version 1.70, 2003/02/05 12:40:38
Line 83 Line 83
 #define ODIRSEPARATOR '\\'  #define ODIRSEPARATOR '\\'
 #endif  #endif
   
 char version[80]="Imach version 0.91, November 2002, INED-EUROREVES ";  char version[80]="Imach version 0.92, February 2003, INED-EUROREVES ";
 int erreur; /* Error number */  int erreur; /* Error number */
 int nvar;  int nvar;
 int cptcovn=0, cptcovage=0, cptcoveff=0,cptcov;  int cptcovn=0, cptcovage=0, cptcoveff=0,cptcov;
Line 1556  void  freqsummary(char fileres[], int ag Line 1556  void  freqsummary(char fileres[], int ag
 }  }
   
 /************ Prevalence ********************/  /************ Prevalence ********************/
 void prevalence(int agemin, float agemax, int **s, double **agev, int nlstate, int imx, int *Tvar, int **nbcode, int *ncodemax,double **mint,double **anint, double dateprev1,double dateprev2, double calagedatem)  void prevalence(int agemin, float agemax, int **s, double **agev, int nlstate, int imx, int *Tvar, int **nbcode, int *ncodemax,double **mint,double **anint, double dateprev1,double dateprev2, int firstpass, int lastpass)
 {    {  
   /* Compute observed prevalence between dateprev1 and dateprev2 by counting the number of people    /* Compute observed prevalence between dateprev1 and dateprev2 by counting the number of people
      in each health status at the date of interview (if between dateprev1 and dateprev2).       in each health status at the date of interview (if between dateprev1 and dateprev2).
Line 1600  void prevalence(int agemin, float agemax Line 1600  void prevalence(int agemin, float agemax
               if(agev[m][i]==0) agev[m][i]=agemax+1;                if(agev[m][i]==0) agev[m][i]=agemax+1;
               if(agev[m][i]==1) agev[m][i]=agemax+2;                if(agev[m][i]==1) agev[m][i]=agemax+2;
               if (m<lastpass) {                if (m<lastpass) {
                 if (calagedatem>0) /* We compute prevalence at exact age, agev in fractional years */                  freq[s[m][i]][s[m+1][i]][(int)agev[m][i]] += weight[i];
                   freq[s[m][i]][s[m+1][i]][(int)(agev[m][i]+1-((int)calagedatem %12)/12.)] += weight[i];  
                 else  
                   freq[s[m][i]][s[m+1][i]][(int)agev[m][i]] += weight[i];  
                 freq[s[m][i]][s[m+1][i]][(int)(agemax+3)] += weight[i];                   freq[s[m][i]][s[m+1][i]][(int)(agemax+3)] += weight[i]; 
               }                }
             }              }
Line 2215  void varevsij(char optionfilefiname[], d Line 2212  void varevsij(char optionfilefiname[], d
             vareij[i][j][(int)age] += doldm[i][j]*hf*hf;              vareij[i][j][(int)age] += doldm[i][j]*hf*hf;
       }        }
     }      }
     
     /* pptj */      /* pptj */
     matprod2(dnewmp,trgradgp,nlstate+1,nlstate+ndeath,1,npar,1,npar,matcov);      matprod2(dnewmp,trgradgp,nlstate+1,nlstate+ndeath,1,npar,1,npar,matcov);
     matprod2(doldmp,dnewmp,nlstate+1,nlstate+ndeath,1,npar,nlstate+1,nlstate+ndeath,gradgp);      matprod2(doldmp,dnewmp,nlstate+1,nlstate+ndeath,1,npar,nlstate+1,nlstate+ndeath,gradgp);
        for(j=nlstate+1;j<=nlstate+ndeath;j++)
    for(j=nlstate+1;j<=nlstate+ndeath;j++)        for(i=nlstate+1;i<=nlstate+ndeath;i++)
      for(i=nlstate+1;i<=nlstate+ndeath;i++){  
         varppt[j][i]=doldmp[j][i];          varppt[j][i]=doldmp[j][i];
     /* end ppptj */      /* end ppptj */
     /*  x centered again */      /*  x centered again */
Line 2237  void varevsij(char optionfilefiname[], d Line 2233  void varevsij(char optionfilefiname[], d
           prlim[i][i]=mobaverage[(int)age][i][ij];            prlim[i][i]=mobaverage[(int)age][i][ij];
       }        }
     }      }
                    
     /* This for computing probability of death (h=1 means      /* This for computing probability of death (h=1 means
        computed over hstepm (estepm) matrices product = hstepm*stepm months)          computed over hstepm (estepm) matrices product = hstepm*stepm months) 
        as a weighted average of prlim.         as a weighted average of prlim.
Line 2298  void varevsij(char optionfilefiname[], d Line 2294  void varevsij(char optionfilefiname[], d
   fclose(ficresprobmorprev);    fclose(ficresprobmorprev);
   fclose(ficgp);    fclose(ficgp);
   fclose(fichtm);    fclose(fichtm);
 }  }  
   
 /************ Variance of prevlim ******************/  /************ Variance of prevlim ******************/
 void varprevlim(char fileres[], double **varpl, double **matcov, double x[], double delti[], int nlstate, int stepm, double bage, double fage, double **oldm, double **savm, double **prlim, double ftolpl, int ij)  void varprevlim(char fileres[], double **varpl, double **matcov, double x[], double delti[], int nlstate, int stepm, double bage, double fage, double **oldm, double **savm, double **prlim, double ftolpl, int ij)
Line 3018  int movingaverage(double ***probs, doubl Line 3014  int movingaverage(double ***probs, doubl
   
   
 /************** Forecasting ******************/  /************** Forecasting ******************/
 prevforecast(char fileres[], double anproj1,double mproj1,double jproj1,double ageminpar, double agemax,double dateprev1, double dateprev2, int mobilav, double agedeb, double fage, int popforecast, char popfile[], double anproj2,double p[], int i2){  prevforecast(char fileres[], double anproj1, double mproj1, double jproj1, double ageminpar, double agemax, double dateprev1, double dateprev2, int mobilav, double bage, double fage, int firstpass, int lastpass, double anproj2, double p[], int cptcoveff){
   /* proj1, year, month, day of starting projection     /* proj1, year, month, day of starting projection 
      agemin, agemax range of age       agemin, agemax range of age
      dateprev1 dateprev2 range of dates during which prevalence is computed       dateprev1 dateprev2 range of dates during which prevalence is computed
             anproj2 year of en of projection (same day and month as proj1).
   */    */
   int yearp, stepsize, hstepm, nhstepm, j,k,c, cptcod, i,h;    int yearp, stepsize, hstepm, nhstepm, j, k, c, cptcod, i, h;
   int *popage;    int *popage;
   double calagedatem, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean;    double agec; /* generic age */
     double agelim, ppij, yp,yp1,yp2,jprojmean,mprojmean,anprojmean;
   double *popeffectif,*popcount;    double *popeffectif,*popcount;
   double ***p3mat;    double ***p3mat;
   double ***mobaverage;    double ***mobaverage;
   char fileresf[FILENAMELENGTH];    char fileresf[FILENAMELENGTH];
   
   agelim=AGESUP;    agelim=AGESUP;
   calagedatem=(anproj1+mproj1/12.+jproj1/365.-dateintmean)*YEARM; /* offset    prevalence(ageminpar, agemax, s, agev, nlstate, imx, Tvar, nbcode, ncodemax, mint, anint, dateprev1, dateprev2, firstpass, lastpass);
       from the mean date of interviews between dateprev1 and dateprev2  
       (in fractional years converted to fractional months) */  
   /* Computing age-specific starting prevalence between exact   
      dateprev1 and dateprev2 (in float years) and  
  shifting ages from calagedatem.  
   */  
   prevalence(ageminpar, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2, calagedatem);  
     
   strcpy(fileresf,"f");     strcpy(fileresf,"f"); 
   strcat(fileresf,fileres);    strcat(fileresf,fileres);
Line 3064  prevforecast(char fileres[], double anpr Line 3054  prevforecast(char fileres[], double anpr
   stepsize=(int) (stepm+YEARM-1)/YEARM;    stepsize=(int) (stepm+YEARM-1)/YEARM;
   if (stepm<=12) stepsize=1;    if (stepm<=12) stepsize=1;
       
   agelim=AGESUP;  
     
   hstepm=1;    hstepm=1;
   hstepm=hstepm/stepm;     hstepm=hstepm/stepm; 
   yp1=modf(dateintmean,&yp);/* extracts integral of datemean in yp  and    yp1=modf(dateintmean,&yp);/* extracts integral of datemean in yp  and
Line 3078  prevforecast(char fileres[], double anpr Line 3066  prevforecast(char fileres[], double anpr
   if(jprojmean==0) jprojmean=1;    if(jprojmean==0) jprojmean=1;
   if(mprojmean==0) jprojmean=1;    if(mprojmean==0) jprojmean=1;
       
   fprintf(ficresf,"# Mean day of interviews %.lf/%.lf/%.lf (%.2f) between %.2f and %.2f ",jprojmean,mprojmean,anprojmean,dateintmean,dateprev1,dateprev2);     fprintf(ficresf,"# Mean day of interviews %.lf/%.lf/%.lf (%.2f) between %.2f and %.2f \n",jprojmean,mprojmean,anprojmean,dateintmean,dateprev1,dateprev2); 
       
   for(cptcov=1, k=0;cptcov<=i2;cptcov++){    fprintf(ficresf,"#****** Routine prevforecast **\n");
     for(cptcov=1, k=0;cptcov<=cptcoveff;cptcov++){
     for(cptcod=1;cptcod<=ncodemax[cptcoveff];cptcod++){      for(cptcod=1;cptcod<=ncodemax[cptcoveff];cptcod++){
       k=k+1;        k=k+1;
       fprintf(ficresf,"\n#******");        fprintf(ficresf,"\n#******");
       for(j=1;j<=cptcoveff;j++) {        for(j=1;j<=cptcoveff;j++) {
         fprintf(ficresf," V%d=%d ",Tvaraff[j],nbcode[Tvaraff[j]][codtab[k][j]]);          fprintf(ficresf," V%d=%d, hpijx=probability over h years, hp.jx is weighted by observed prev ",Tvaraff[j],nbcode[Tvaraff[j]][codtab[k][j]]);
       }        }
       fprintf(ficresf,"******\n");        fprintf(ficresf,"******\n");
       fprintf(ficresf,"# StartingAge FinalAge");        fprintf(ficresf,"# Covariate valuofcovar yearproj age");
       for(j=1; j<=nlstate+ndeath;j++) fprintf(ficresf," P.%d",j);        for(j=1; j<=nlstate+ndeath;j++){ 
           for(i=1; i<=nlstate;i++)              
             fprintf(ficresf," p%d%d",i,j);
           fprintf(ficresf," p.%d",j);
         }
       for (yearp=0; yearp<=(anproj2-anproj1);yearp++) {         for (yearp=0; yearp<=(anproj2-anproj1);yearp++) { 
         fprintf(ficresf,"\n");          fprintf(ficresf,"\n");
         fprintf(ficresf,"\n# Forecasting at date %.lf/%.lf/%.lf ",jproj1,mproj1,anproj1+cpt);             fprintf(ficresf,"\n# Forecasting at date %.lf/%.lf/%.lf ",jproj1,mproj1,anproj1+yearp);   
   
         for (agedeb=(fage-((int)calagedatem %12/12.)); agedeb>=(ageminpar-((int)calagedatem %12)/12.); agedeb--){           for (agec=fage; agec>=ageminpar; agec--){ 
           nhstepm=(int) rint((agelim-agedeb)*YEARM/stepm);             nhstepm=(int) rint((agelim-agec)*YEARM/stepm); 
           nhstepm = nhstepm/hstepm;             nhstepm = nhstepm/hstepm; 
             
           p3mat=ma3x(1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm);            p3mat=ma3x(1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm);
           oldm=oldms;savm=savms;            oldm=oldms;savm=savms;
           hpxij(p3mat,nhstepm,agedeb,hstepm,p,nlstate,stepm,oldm,savm, k);              hpxij(p3mat,nhstepm,agec,hstepm,p,nlstate,stepm,oldm,savm, k);  
                   
           for (h=0; h<=nhstepm; h++){            for (h=0; h<=nhstepm; h++){
             if (h==(int) (calagedatem+YEARM*yearp)) {              if (h==(int) (YEARM*yearp)) {
               fprintf(ficresf,"\n");                fprintf(ficresf,"\n");
               for(j=1;j<=cptcoveff;j++)                 for(j=1;j<=cptcoveff;j++) 
                 fprintf(ficresf,"%d %d ",Tvaraff[j],nbcode[Tvaraff[j]][codtab[k][j]]);                  fprintf(ficresf,"%d %d ",Tvaraff[j],nbcode[Tvaraff[j]][codtab[k][j]]);
               fprintf(ficresf,"%.f %.f ",anproj1+yearp,agedeb+h*hstepm/YEARM*stepm);                fprintf(ficresf,"%.f %.f ",anproj1+yearp,agec+h*hstepm/YEARM*stepm);
             }               } 
             for(j=1; j<=nlstate+ndeath;j++) {              for(j=1; j<=nlstate+ndeath;j++) {
               kk1=0.;kk2=0;                ppij=0.;
               for(i=1; i<=nlstate;i++) {                              for(i=1; i<=nlstate;i++) {              
                 if (mobilav==1)                   if (mobilav==1) 
                   kk1=kk1+p3mat[i][j][h]*mobaverage[(int)agedeb+1][i][cptcod];                    ppij=ppij+p3mat[i][j][h]*mobaverage[(int)agec+1][i][cptcod];
                 else {                  else {
                   kk1=kk1+p3mat[i][j][h]*probs[(int)(agedeb+1)][i][cptcod];                    ppij=ppij+p3mat[i][j][h]*probs[(int)(agec+1)][i][cptcod];
                 }                  }
                                   if (h==(int)(YEARM*yearp))
                     fprintf(ficresf," %.3f", p3mat[i][j][h]);
               }                }
               if (h==(int)(calagedatem+12*yearp)){                if (h==(int)(YEARM*yearp)){
                 fprintf(ficresf," %.3f", kk1);                  fprintf(ficresf," %.3f", ppij);
                           
               }                }
             }              }
           }            }
Line 3135  prevforecast(char fileres[], double anpr Line 3127  prevforecast(char fileres[], double anpr
   
   fclose(ficresf);    fclose(ficresf);
 }  }
 /************** Forecasting ******************/  
   /************** Forecasting *****not tested NB*************/
 populforecast(char fileres[], double anpyram,double mpyram,double jpyram,double ageminpar, double agemax,double dateprev1, double dateprev2, int mobilav, double agedeb, double fage, int popforecast, char popfile[], double anpyram1,double p[], int i2){  populforecast(char fileres[], double anpyram,double mpyram,double jpyram,double ageminpar, double agemax,double dateprev1, double dateprev2, int mobilav, double agedeb, double fage, int popforecast, char popfile[], double anpyram1,double p[], int i2){
       
   int cpt, stepsize, hstepm, nhstepm, j,k,c, cptcod, i,h;    int cpt, stepsize, hstepm, nhstepm, j,k,c, cptcod, i,h;
Line 3151  populforecast(char fileres[], double anp Line 3144  populforecast(char fileres[], double anp
   agelim=AGESUP;    agelim=AGESUP;
   calagedatem=(anpyram+mpyram/12.+jpyram/365.-dateintmean)*YEARM;    calagedatem=(anpyram+mpyram/12.+jpyram/365.-dateintmean)*YEARM;
       
   prevalence(ageminpar, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2, calagedatem);    prevalence(ageminpar, agemax, s, agev, nlstate, imx, Tvar, nbcode, ncodemax, mint, anint, dateprev1, dateprev2, firstpass, lastpass);
       
       
   strcpy(filerespop,"pop");     strcpy(filerespop,"pop"); 
Line 3324  int main(int argc, char *argv[]) Line 3317  int main(int argc, char *argv[])
   int mobilavproj=0 , prevfcast=0 ; /* moving average of prev, If prevfcast=1 prevalence projection */    int mobilavproj=0 , prevfcast=0 ; /* moving average of prev, If prevfcast=1 prevalence projection */
   int mobilav=0,popforecast=0;    int mobilav=0,popforecast=0;
   int hstepm, nhstepm;    int hstepm, nhstepm;
   double jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,jpyram, mpyram,anpyram,jpyram1, mpyram1,anpyram1, calagedatem;    double jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,jpyram, mpyram,anpyram,jpyram1, mpyram1,anpyram1;
   
   double bage, fage, age, agelim, agebase;    double bage, fage, age, agelim, agebase;
   double ftolpl=FTOL;    double ftolpl=FTOL;
Line 3738  int main(int argc, char *argv[]) Line 3731  int main(int argc, char *argv[])
                 agev[m][i]=-1;                  agev[m][i]=-1;
               }                }
             }              }
         }<          }
         else if(s[m][i] !=9){ /* Standard case, age in fractional          else if(s[m][i] !=9){ /* Standard case, age in fractional
                                  years but with the precision of a                                   years but with the precision of a
                                  month */                                   month */
Line 3972  int main(int argc, char *argv[]) Line 3965  int main(int argc, char *argv[])
   ungetc(c,ficpar);    ungetc(c,ficpar);
     
   
   dateprev1=anprev1+mprev1/12.+jprev1/365.;    dateprev1=anprev1+(mprev1-1)/12.+(jprev1-1)/365.;
   dateprev2=anprev2+mprev2/12.+jprev2/365.;    dateprev2=anprev2+(mprev2-1)/12.+(jprev2-1)/365.;
   
   fscanf(ficpar,"pop_based=%d\n",&popbased);    fscanf(ficpar,"pop_based=%d\n",&popbased);
   fprintf(ficparo,"pop_based=%d\n",popbased);       fprintf(ficparo,"pop_based=%d\n",popbased);   
Line 3988  int main(int argc, char *argv[]) Line 3981  int main(int argc, char *argv[])
   ungetc(c,ficpar);    ungetc(c,ficpar);
   
   fscanf(ficpar,"prevforecast=%d starting-proj-date=%lf/%lf/%lf final-proj-date=%lf/%lf/%lf mobil_average=%d\n",&prevfcast,&jproj1,&mproj1,&anproj1,&jproj2,&mproj2,&anproj2,&mobilavproj);    fscanf(ficpar,"prevforecast=%d starting-proj-date=%lf/%lf/%lf final-proj-date=%lf/%lf/%lf mobil_average=%d\n",&prevfcast,&jproj1,&mproj1,&anproj1,&jproj2,&mproj2,&anproj2,&mobilavproj);
   fprintf(ficparo,"prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobil_average=%d\n",&prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);    fprintf(ficparo,"prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobil_average=%d\n",prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);
   printf("prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobilaverage=%d\n",&prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);    printf("prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobilaverage=%d\n",&prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);
   fprintf(ficlog,"prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobilaverage=%d\n",&prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);    fprintf(ficlog,"prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobilaverage=%d\n",prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);
   fprintf(ficres,"prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobilaverage=%d\n",&prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);    fprintf(ficres,"prevforecast=%d starting-proj-date=%.lf/%.lf/%.lf final-proj-date=%.lf/%.lf/%.lf mobilaverage=%d\n",prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);
   /* day and month of proj2 are not used but only year anproj2.*/    /* day and month of proj2 are not used but only year anproj2.*/
   
   while((c=getc(ficpar))=='#' && c!= EOF){    while((c=getc(ficpar))=='#' && c!= EOF){
Line 4129  Interval (in months) between two waves: Line 4122  Interval (in months) between two waves:
   
   /* hstepm=1;   aff par mois*/    /* hstepm=1;   aff par mois*/
   
     fprintf(ficrespij,"#****** h Pij x Probability to be in state j at age x+h being in i at x ");
   for(cptcov=1,k=0;cptcov<=i1;cptcov++){    for(cptcov=1,k=0;cptcov<=i1;cptcov++){
     for(cptcod=1;cptcod<=ncodemax[cptcov];cptcod++){      for(cptcod=1;cptcod<=ncodemax[cptcov];cptcod++){
       k=k+1;        k=k+1;
Line 4146  Interval (in months) between two waves: Line 4140  Interval (in months) between two waves:
         p3mat=ma3x(1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm);          p3mat=ma3x(1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm);
         oldm=oldms;savm=savms;          oldm=oldms;savm=savms;
         hpxij(p3mat,nhstepm,agedeb,hstepm,p,nlstate,stepm,oldm,savm, k);            hpxij(p3mat,nhstepm,agedeb,hstepm,p,nlstate,stepm,oldm,savm, k);  
         fprintf(ficrespij,"# Age");          fprintf(ficrespij,"# Cov Agex agex+h hpijx with i,j=");
         for(i=1; i<=nlstate;i++)          for(i=1; i<=nlstate;i++)
           for(j=1; j<=nlstate+ndeath;j++)            for(j=1; j<=nlstate+ndeath;j++)
             fprintf(ficrespij," %1d-%1d",i,j);              fprintf(ficrespij," %1d-%1d",i,j);
         fprintf(ficrespij,"\n");          fprintf(ficrespij,"\n");
         for (h=0; h<=nhstepm; h++){          for (h=0; h<=nhstepm; h++){
           fprintf(ficrespij,"%d %f %f",k,agedeb, agedeb+ h*hstepm/YEARM*stepm );            fprintf(ficrespij,"%d %3.f %3.f",k,agedeb, agedeb+ h*hstepm/YEARM*stepm );
           for(i=1; i<=nlstate;i++)            for(i=1; i<=nlstate;i++)
             for(j=1; j<=nlstate+ndeath;j++)              for(j=1; j<=nlstate+ndeath;j++)
               fprintf(ficrespij," %.5f", p3mat[i][j][h]);                fprintf(ficrespij," %.5f", p3mat[i][j][h]);
Line 4173  Interval (in months) between two waves: Line 4167  Interval (in months) between two waves:
   /*if((stepm == 1) && (strcmp(model,".")==0)){*/    /*if((stepm == 1) && (strcmp(model,".")==0)){*/
   if(prevfcast==1){    if(prevfcast==1){
     if(stepm ==1){      if(stepm ==1){
       prevforecast(fileres, anproj1,mproj1,jproj1, agemin,agemax, dateprev1, dateprev2,mobilavproj, agedeb, fage, popforecast, popfile, anproj2,p, i1);        prevforecast(fileres, anproj1, mproj1, jproj1, agemin, agemax, dateprev1, dateprev2, mobilavproj, bage, fage, firstpass, lastpass, anproj2, p, cptcoveff);
       if (popforecast==1) populforecast(fileres, anpyram,mpyram,jpyram, agemin,agemax, dateprev1, dateprev2,mobilav, agedeb, fage, popforecast, popfile, anpyram1,p, i1);        if (popforecast==1) populforecast(fileres, anpyram,mpyram,jpyram, agemin,agemax, dateprev1, dateprev2,mobilav, agedeb, fage, popforecast, popfile, anpyram1,p, i1);
     }       } 
     else{      else{
Line 4214  Interval (in months) between two waves: Line 4208  Interval (in months) between two waves:
   printf("Computing Variance-covariance of DFLEs: file '%s' \n", fileresv);    printf("Computing Variance-covariance of DFLEs: file '%s' \n", fileresv);
   fprintf(ficlog,"Computing Variance-covariance of DFLEs: file '%s' \n", fileresv);    fprintf(ficlog,"Computing Variance-covariance of DFLEs: file '%s' \n", fileresv);
   
   calagedatem=-1;    prevalence(ageminpar, agemax, s, agev, nlstate, imx, Tvar, nbcode, ncodemax, mint, anint, dateprev1, dateprev2, firstpass, lastpass);
   
   prevalence(ageminpar, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2, calagedatem);  
   
   if (mobilav!=0) {    if (mobilav!=0) {
     mobaverage= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX);      mobaverage= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX);

Removed from v.1.69  
changed lines
  Added in v.1.70


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>