Diff for /imach/src/imach.c between versions 1.257 and 1.258

version 1.257, 2017/03/29 16:53:30 version 1.258, 2017/04/03 10:17:47
Line 1 Line 1
 /* $Id$  /* $Id$
   $State$    $State$
   $Log$    $Log$
     Revision 1.258  2017/04/03 10:17:47  brouard
     Summary: Version 0.99r12
   
     Some cleanings, conformed with updated documentation.
   
   Revision 1.257  2017/03/29 16:53:30  brouard    Revision 1.257  2017/03/29 16:53:30  brouard
   Summary: Temp    Summary: Temp
   
Line 1177  int *TvarsQind; Line 1182  int *TvarsQind;
   
 #define MAXRESULTLINES 10  #define MAXRESULTLINES 10
 int nresult=0;  int nresult=0;
   int parameterline=0; /* # of the parameter (type) line */
 int TKresult[MAXRESULTLINES];  int TKresult[MAXRESULTLINES];
 int Tresult[MAXRESULTLINES][NCOVMAX];/* For dummy variable , value (output) */  int Tresult[MAXRESULTLINES][NCOVMAX];/* For dummy variable , value (output) */
 int Tinvresult[MAXRESULTLINES][NCOVMAX];/* For dummy variable , value (output) */  int Tinvresult[MAXRESULTLINES][NCOVMAX];/* For dummy variable , value (output) */
Line 6375  To be simple, these graphs help to under Line 6381  To be simple, these graphs help to under
 void printinghtml(char fileresu[], char title[], char datafile[], int firstpass, \  void printinghtml(char fileresu[], char title[], char datafile[], int firstpass, \
                   int lastpass, int stepm, int weightopt, char model[],\                    int lastpass, int stepm, int weightopt, char model[],\
                   int imx,int jmin, int jmax, double jmeanint,char rfileres[],\                    int imx,int jmin, int jmax, double jmeanint,char rfileres[],\
                   int popforecast, int prevfcast, int backcast, int estepm , \                    int popforecast, int mobilav, int prevfcast, int mobilavproj, int backcast, int estepm , \
                   double jprev1, double mprev1,double anprev1, double dateprev1, \                    double jprev1, double mprev1,double anprev1, double dateprev1, \
                   double jprev2, double mprev2,double anprev2, double dateprev2){                    double jprev2, double mprev2,double anprev2, double dateprev2){
   int jj1, k1, i1, cpt, k4, nres;    int jj1, k1, i1, cpt, k4, nres;
Line 6486  divided by h: <sub>h</sub>P<sub>ij</sub> Line 6492  divided by h: <sub>h</sub>P<sub>ij</sub>
      if(prevfcast==1){       if(prevfcast==1){
        /* Projection of prevalence up to period (stable) prevalence in each health state */         /* Projection of prevalence up to period (stable) prevalence in each health state */
        for(cpt=1; cpt<=nlstate;cpt++){         for(cpt=1; cpt<=nlstate;cpt++){
          fprintf(fichtm,"<br>\n- Projection of cross-sectional prevalence (estimated with cases observed from %.1f to %.1f) up to period (stable) prevalence in state %d. Or probability to be in state %d being in state (1 to %d) at different ages. <a href=\"%s_%d-%d-%d.svg\">%s_%d-%d-%d.svg</a><br> \           fprintf(fichtm,"<br>\n- Projection of cross-sectional prevalence (estimated with cases observed from %.1f to %.1f and mobil_average=%d) up to period (stable) prevalence in state %d. Or probability to be in state %d being in state (1 to %d) at different ages. <a href=\"%s_%d-%d-%d.svg\">%s_%d-%d-%d.svg</a><br> \
 <img src=\"%s_%d-%d-%d.svg\">", dateprev1, dateprev2, cpt, cpt, nlstate, subdirf2(optionfilefiname,"PROJ_"),cpt,k1,nres,subdirf2(optionfilefiname,"PROJ_"),cpt,k1,nres,subdirf2(optionfilefiname,"PROJ_"),cpt,k1,nres);  <img src=\"%s_%d-%d-%d.svg\">", dateprev1, dateprev2, mobilavproj, cpt, cpt, nlstate, subdirf2(optionfilefiname,"PROJ_"),cpt,k1,nres,subdirf2(optionfilefiname,"PROJ_"),cpt,k1,nres,subdirf2(optionfilefiname,"PROJ_"),cpt,k1,nres);
        }         }
      }       }
                     
Line 6575  See page 'Matrix of variance-covariance Line 6581  See page 'Matrix of variance-covariance
        }         }
      }       }
      for(cpt=1; cpt<=nlstate;cpt++) {       for(cpt=1; cpt<=nlstate;cpt++) {
        fprintf(fichtm,"\n<br>- Observed (cross-sectional) and period (incidence based) \         fprintf(fichtm,"\n<br>- Observed (cross-sectional with mov_average=%d) and period (incidence based) \
 prevalence (with 95%% confidence interval) in state (%d): <a href=\"%s_%d-%d-%d.svg\"> %s_%d-%d-%d.svg</a>\n <br>\  prevalence (with 95%% confidence interval) in state (%d): <a href=\"%s_%d-%d-%d.svg\"> %s_%d-%d-%d.svg</a>\n <br>\
 <img src=\"%s_%d-%d-%d.svg\">",cpt,subdirf2(optionfilefiname,"V_"),cpt,k1,nres,subdirf2(optionfilefiname,"V_"),cpt,k1,nres,subdirf2(optionfilefiname,"V_"),cpt,k1,nres);    <img src=\"%s_%d-%d-%d.svg\">",mobilav,cpt,subdirf2(optionfilefiname,"V_"),cpt,k1,nres,subdirf2(optionfilefiname,"V_"),cpt,k1,nres,subdirf2(optionfilefiname,"V_"),cpt,k1,nres);  
      }       }
      fprintf(fichtm,"\n<br>- Total life expectancy by age and \       fprintf(fichtm,"\n<br>- Total life expectancy by age and \
 health expectancies in states (1) and (2). If popbased=1 the smooth (due to the model) \  health expectancies in states (1) and (2). If popbased=1 the smooth (due to the model) \
Line 9777  int main(int argc, char *argv[]) Line 9783  int main(int argc, char *argv[])
   int NDIM=2;    int NDIM=2;
   int vpopbased=0;    int vpopbased=0;
   int nres=0;    int nres=0;
     int endishere=0;
   
   char ca[32], cb[32];    char ca[32], cb[32];
   /*  FILE *fichtm; *//* Html File */    /*  FILE *fichtm; *//* Html File */
Line 11151  Please run with mle=-1 to get a correct Line 11158  Please run with mle=-1 to get a correct
         fprintf(ficlog,"Error: Not 7 (data)parameters in line but %d, for example:begin-prev-date=1/1/1990 end-prev-date=1/6/2004  mov_average=0\n, your line=%s . Probably you are running an older format.\n",num_filled,line);          fprintf(ficlog,"Error: Not 7 (data)parameters in line but %d, for example:begin-prev-date=1/1/1990 end-prev-date=1/6/2004  mov_average=0\n, your line=%s . Probably you are running an older format.\n",num_filled,line);
         goto end;          goto end;
       }        }
     /* fscanf(ficpar,"begin-prev-date=%lf/%lf/%lf end-prev-date=%lf/%lf/%lf mov_average=%d\n",&jprev1, &mprev1,&anprev1,&jprev2, &mprev2,&anprev2,&mobilav); */  
       printf("begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);        printf("begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);
       fprintf(ficparo,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);        fprintf(ficparo,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);
       fprintf(ficres,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);        fprintf(ficres,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);
       printf("begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);  
       fprintf(ficlog,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);        fprintf(ficlog,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);
     }      }
   
Line 11187  Please run with mle=-1 to get a correct Line 11192  Please run with mle=-1 to get a correct
       fprintf(ficres,"pop_based=%d\n",popbased);           fprintf(ficres,"pop_based=%d\n",popbased);   
     }      }
             
     while(fgets(line, MAXLINE, ficpar)) {  
       /* If line starts with a # it is a comment */  
       if (line[0] == '#') {  
         numlinepar++;  
         fputs(line,stdout);  
         fputs(line,ficparo);  
         fputs(line,ficlog);  
         continue;  
       }else  
         break;  
     }  
    /* while((c=getc(ficpar))=='#' && c!= EOF){ */  
    /*    ungetc(c,ficpar); */  
    /*    fgets(line, MAXLINE, ficpar); */  
    /*    fputs(line,stdout); */  
    /*    fputs(line,ficres); */  
    /*    fputs(line,ficparo); */  
    /*  } */  
    /*  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); */  
     if((num_filled=sscanf(line,"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)) !=EOF){  
       if (num_filled != 8) {  
         printf("Error: Not 8 (data)parameters in line but %d, for example:prevforecast=1 starting-proj-date=1/1/1990 final-proj-date=1/1/2000 mobil_average=0\n, your line=%s . Probably you are running an older format.\n",num_filled,line);  
         fprintf(ficlog,"Error: Not 8 (data)parameters in line but %d, for example:prevforecast=1 starting-proj-date=1/1/1990 final-proj-date=1/1/2000 mov_average=0\n, your line=%s . Probably you are running an older format.\n",num_filled,line);  
         goto end;  
       }  
      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 mobil_average=%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 mobil_average=%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 mobil_average=%d\n",prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);  
     /* day and month of proj2 are not used but only year anproj2.*/  
     }  
      while(fgets(line, MAXLINE, ficpar)) {  
       /* If line starts with a # it is a comment */  
       if (line[0] == '#') {  
         numlinepar++;  
         fputs(line,stdout);  
         fputs(line,ficparo);  
         fputs(line,ficlog);  
         continue;  
       }else  
         break;  
     }  
     /* while((c=getc(ficpar))=='#' && c!= EOF){ */  
     /*   ungetc(c,ficpar); */  
     /*   fgets(line, MAXLINE, ficpar); */  
     /*   fputs(line,stdout); */  
     /*   fputs(line,ficparo); */  
     /*   fputs(line,ficres); */  
     /* } */  
     /* ungetc(c,ficpar); */  
       
     fscanf(ficpar,"backcast=%d starting-back-date=%lf/%lf/%lf final-back-date=%lf/%lf/%lf mobil_average=%d\n",&backcast,&jback1,&mback1,&anback1,&jback2,&mback2,&anback2,&mobilavproj);  
     if((num_filled=sscanf(line,"backcast=%d starting-back-date=%lf/%lf/%lf final-back-date=%lf/%lf/%lf mobil_average=%d\n",&backcast,&jback1,&mback1,&anback1,&jback2,&mback2,&anback2,&mobilavproj)) !=EOF){  
       if (num_filled != 8) {  
         printf("Error: Not 8 (data)parameters in line but %d, for example:backcast=1 starting-back-date=1/1/1990 finloal-back-date=1/1/1970 mobil_average=1\n, your line=%s . Probably you are running an older format.\n",num_filled,line);  
         fprintf(ficlog,"Error: Not 8 (data)parameters in line but %d, for example:backcast=1 starting-back-date=1/1/1990 finloal-back-date=1/1/1970 mobil_average=1\n, your line=%s . Probably you are running an older format.\n",num_filled,line);  
         goto end;  
       }  
       printf("backcast=%d starting-back-date=%.lf/%.lf/%.lf final-back-date=%.lf/%.lf/%.lf mobil_average=%d\n",backcast,jback1,mback1,anback1,jback2,mback2,anback2,mobilavproj);  
       fprintf(ficparo,"backcast=%d starting-back-date=%.lf/%.lf/%.lf final-back-date=%.lf/%.lf/%.lf mobil_average=%d\n",backcast,jback1,mback1,anback1,jback2,mback2,anback2,mobilavproj);  
       fprintf(ficlog,"backcast=%d starting-back-date=%.lf/%.lf/%.lf final-back-date=%.lf/%.lf/%.lf mobil_average=%d\n",backcast,jback1,mback1,anback1,jback2,mback2,anback2,mobilavproj);  
       fprintf(ficres,"backcast=%d starting-back-date=%.lf/%.lf/%.lf final-back-date=%.lf/%.lf/%.lf mobil_average=%d\n",backcast,jback1,mback1,anback1,jback2,mback2,anback2,mobilavproj);  
     /* day and month of proj2 are not used but only year anproj2.*/  
     }  
     /* Results */      /* Results */
     nresult=0;      nresult=0;
     while(fgets(line, MAXLINE, ficpar)) {      do{
       /* If line starts with a # it is a comment */        if(!fgets(line, MAXLINE, ficpar)){
       if (line[0] == '#') {          endishere=1;
           parameterline=14;
         }else if (line[0] == '#') {
           /* If line starts with a # it is a comment */
         numlinepar++;          numlinepar++;
         fputs(line,stdout);          fputs(line,stdout);
         fputs(line,ficparo);          fputs(line,ficparo);
         fputs(line,ficlog);          fputs(line,ficlog);
         fputs(line,ficres);  
         continue;          continue;
       }else        }else if(sscanf(line,"prevforecast=%[^\n]\n",modeltemp))
         break;          parameterline=11;
     }        else if(sscanf(line,"backcast=%[^\n]\n",modeltemp))
     if (!feof(ficpar))          parameterline=12;
     while((num_filled=sscanf(line,"result:%[^\n]\n",resultline)) !=EOF){        else if(sscanf(line,"result:%[^\n]\n",modeltemp))
       if (num_filled == 0){          parameterline=13;
         resultline[0]='\0';        else{
         printf("Warning %d: no result line should be at minimum 'result: V2=0 V1=1 or result:.\n%s\n", num_filled, line);          parameterline=14;
       break;  
       } else if (num_filled != 1){  
         printf("ERROR %d: result line should be at minimum 'result: V2=0 V1=1 or result:.' %s\n",num_filled, line);  
       }  
       nresult++; /* Sum of resultlines */  
       printf("Result %d: result=%s\n",nresult, resultline);  
       if(nresult > MAXRESULTLINES){  
         printf("ERROR: Current version of IMaCh limits the number of resultlines to %d, you used %d\n",MAXRESULTLINES,nresult);  
         fprintf(ficlog,"ERROR: Current version of IMaCh limits the number of resultlines to %d, you used %d\n",MAXRESULTLINES,nresult);  
         goto end;  
       }  
       decoderesult(resultline, nresult); /* Fills TKresult[nresult] combination and Tresult[nresult][k4+1] combination values */  
       fprintf(ficparo,"result: %s\n",resultline);  
       fprintf(ficres,"result: %s\n",resultline);  
       fprintf(ficlog,"result: %s\n",resultline);  
       while(fgets(line, MAXLINE, ficpar)) {  
         /* If line starts with a # it is a comment */  
         if (line[0] == '#') {  
           numlinepar++;  
           fputs(line,stdout);  
           fputs(line,ficparo);  
           fputs(line,ficres);  
           fputs(line,ficlog);  
           continue;  
         }else  
           break;  
       }        }
       if (feof(ficpar))        switch (parameterline){ 
         case 11:
           if((num_filled=sscanf(line,"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)) !=EOF){
             if (num_filled != 8) {
               printf("Error: Not 8 (data)parameters in line but %d, for example:prevforecast=1 starting-proj-date=1/1/1990 final-proj-date=1/1/2000 mobil_average=0\n, your line=%s . Probably you are running an older format.\n",num_filled,line);
               fprintf(ficlog,"Error: Not 8 (data)parameters in line but %d, for example:prevforecast=1 starting-proj-date=1/1/1990 final-proj-date=1/1/2000 mov_average=0\n, your line=%s . Probably you are running an older format.\n",num_filled,line);
               goto end;
             }
             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 mobil_average=%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 mobil_average=%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 mobil_average=%d\n",prevfcast,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2,mobilavproj);
             /* day and month of proj2 are not used but only year anproj2.*/
           }
         break;          break;
       else{ /* Processess output results for this combination of covariate values */        case 12:
       }                                      /*fscanf(ficpar,"backcast=%d starting-back-date=%lf/%lf/%lf final-back-date=%lf/%lf/%lf mobil_average=%d\n",&backcast,&jback1,&mback1,&anback1,&jback2,&mback2,&anback2,&mobilavproj);*/
     } /* end while */          if((num_filled=sscanf(line,"backcast=%d starting-back-date=%lf/%lf/%lf final-back-date=%lf/%lf/%lf mobil_average=%d\n",&backcast,&jback1,&mback1,&anback1,&jback2,&mback2,&anback2,&mobilavproj)) !=EOF){
             if (num_filled != 8) {
               printf("Error: Not 8 (data)parameters in line but %d, for example:backcast=1 starting-back-date=1/1/1990 finloal-back-date=1/1/1970 mobil_average=1\n, your line=%s . Probably you are running an older format.\n",num_filled,line);
               fprintf(ficlog,"Error: Not 8 (data)parameters in line but %d, for example:backcast=1 starting-back-date=1/1/1990 finloal-back-date=1/1/1970 mobil_average=1\n, your line=%s . Probably you are running an older format.\n",num_filled,line);
               goto end;
             }
             printf("backcast=%d starting-back-date=%.lf/%.lf/%.lf final-back-date=%.lf/%.lf/%.lf mobil_average=%d\n",backcast,jback1,mback1,anback1,jback2,mback2,anback2,mobilavproj);
             fprintf(ficparo,"backcast=%d starting-back-date=%.lf/%.lf/%.lf final-back-date=%.lf/%.lf/%.lf mobil_average=%d\n",backcast,jback1,mback1,anback1,jback2,mback2,anback2,mobilavproj);
             fprintf(ficlog,"backcast=%d starting-back-date=%.lf/%.lf/%.lf final-back-date=%.lf/%.lf/%.lf mobil_average=%d\n",backcast,jback1,mback1,anback1,jback2,mback2,anback2,mobilavproj);
             fprintf(ficres,"backcast=%d starting-back-date=%.lf/%.lf/%.lf final-back-date=%.lf/%.lf/%.lf mobil_average=%d\n",backcast,jback1,mback1,anback1,jback2,mback2,anback2,mobilavproj);
             /* day and month of proj2 are not used but only year anproj2.*/
           }
           break;
         case 13:
           if((num_filled=sscanf(line,"result:%[^\n]\n",resultline)) !=EOF){
             if (num_filled == 0){
               resultline[0]='\0';
               printf("Warning %d: no result line! It should be at minimum 'result: V2=0 V1=1 or result:.\n%s\n", num_filled, line);
               fprintf(ficlog,"Warning %d: no result line! It should be at minimum 'result: V2=0 V1=1 or result:.\n%s\n", num_filled, line);
               break;
             } else if (num_filled != 1){
               printf("ERROR %d: result line! It should be at minimum 'result: V2=0 V1=1 or result:.' %s\n",num_filled, line);
               fprintf(ficlog,"ERROR %d: result line! It should be at minimum 'result: V2=0 V1=1 or result:.' %s\n",num_filled, line);
             }
             nresult++; /* Sum of resultlines */
             printf("Result %d: result=%s\n",nresult, resultline);
             if(nresult > MAXRESULTLINES){
               printf("ERROR: Current version of IMaCh limits the number of resultlines to %d, you used %d\n",MAXRESULTLINES,nresult);
               fprintf(ficlog,"ERROR: Current version of IMaCh limits the number of resultlines to %d, you used %d\n",MAXRESULTLINES,nresult);
               goto end;
             }
             decoderesult(resultline, nresult); /* Fills TKresult[nresult] combination and Tresult[nresult][k4+1] combination values */
             fprintf(ficparo,"result: %s\n",resultline);
             fprintf(ficres,"result: %s\n",resultline);
             fprintf(ficlog,"result: %s\n",resultline);
             break;
           case 14: 
             if(ncovmodel >2){
               printf("ERROR: no result line! It should be at minimum 'result: V2=0 V1=1 or result:.' %s\n",line);
               goto end;
             }
           default:
             nresult=1;
             decoderesult(".",nresult ); /* No covariate */
           }
         } /* End switch parameterline */
       }while(endishere==0); /* End do */
           
     /* freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvaraff,nbcode, ncodemax,mint,anint); */      /* freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvaraff,nbcode, ncodemax,mint,anint); */
     /* ,dateprev1,dateprev2,jprev1, mprev1,anprev1,jprev2, mprev2,anprev2); */      /* ,dateprev1,dateprev2,jprev1, mprev1,anprev1,jprev2, mprev2,anprev2); */
Line 11322  Please run with mle=-1 to get a correct Line 11294  Please run with mle=-1 to get a correct
       printinggnuplot(fileresu, optionfilefiname,ageminpar,agemaxpar,fage, prevfcast, backcast, pathc,p);        printinggnuplot(fileresu, optionfilefiname,ageminpar,agemaxpar,fage, prevfcast, backcast, pathc,p);
     }      }
     printinghtml(fileresu,title,datafile, firstpass, lastpass, stepm, weightopt, \      printinghtml(fileresu,title,datafile, firstpass, lastpass, stepm, weightopt, \
                  model,imx,jmin,jmax,jmean,rfileres,popforecast,prevfcast,backcast, estepm, \                   model,imx,jmin,jmax,jmean,rfileres,popforecast,mobilav,prevfcast,mobilavproj,backcast, estepm, \
                  jprev1,mprev1,anprev1,dateprev1,jprev2,mprev2,anprev2,dateprev2);                   jprev1,mprev1,anprev1,dateprev1,jprev2,mprev2,anprev2,dateprev2);
                                   
     /*------------ free_vector  -------------*/      /*------------ free_vector  -------------*/
Line 11375  Please run with mle=-1 to get a correct Line 11347  Please run with mle=-1 to get a correct
       mobaverage=mobaverages;        mobaverage=mobaverages;
       if (mobilav!=0) {        if (mobilav!=0) {
         printf("Movingaveraging observed prevalence\n");          printf("Movingaveraging observed prevalence\n");
           fprintf(ficlog,"Movingaveraging observed prevalence\n");
         if (movingaverage(probs, ageminpar, agemaxpar, mobaverage, mobilav)!=0){          if (movingaverage(probs, ageminpar, agemaxpar, mobaverage, mobilav)!=0){
           fprintf(ficlog," Error in movingaverage mobilav=%d\n",mobilav);            fprintf(ficlog," Error in movingaverage mobilav=%d\n",mobilav);
           printf(" Error in movingaverage mobilav=%d\n",mobilav);            printf(" Error in movingaverage mobilav=%d\n",mobilav);
Line 11384  Please run with mle=-1 to get a correct Line 11357  Please run with mle=-1 to get a correct
       /* prevalence(probs, ageminpar, agemaxpar, s, agev, nlstate, imx, Tvar, nbcode, ncodemax, mint, anint, dateprev1, dateprev2, firstpass, lastpass); */        /* prevalence(probs, ageminpar, agemaxpar, s, agev, nlstate, imx, Tvar, nbcode, ncodemax, mint, anint, dateprev1, dateprev2, firstpass, lastpass); */
       else if (mobilavproj !=0) {        else if (mobilavproj !=0) {
         printf("Movingaveraging projected observed prevalence\n");          printf("Movingaveraging projected observed prevalence\n");
           fprintf(ficlog,"Movingaveraging projected observed prevalence\n");
         if (movingaverage(probs, ageminpar, agemaxpar, mobaverage, mobilavproj)!=0){          if (movingaverage(probs, ageminpar, agemaxpar, mobaverage, mobilavproj)!=0){
           fprintf(ficlog," Error in movingaverage mobilavproj=%d\n",mobilavproj);            fprintf(ficlog," Error in movingaverage mobilavproj=%d\n",mobilavproj);
           printf(" Error in movingaverage mobilavproj=%d\n",mobilavproj);            printf(" Error in movingaverage mobilavproj=%d\n",mobilavproj);

Removed from v.1.257  
changed lines
  Added in v.1.258


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