Diff for /imach/src/imach.c between versions 1.269 and 1.272

version 1.269, 2017/05/23 08:39:25 version 1.272, 2017/06/27 10:22:40
Line 1 Line 1
 /* $Id$  /* $Id$
   $State$    $State$
   $Log$    $Log$
     Revision 1.272  2017/06/27 10:22:40  brouard
     Summary: Color of backprojection changed from 6 to 5(yellow)
   
     Revision 1.271  2017/06/27 10:17:50  brouard
     Summary: Some bug with rint
   
     Revision 1.270  2017/05/24 05:45:29  brouard
     *** empty log message ***
   
   Revision 1.269  2017/05/23 08:39:25  brouard    Revision 1.269  2017/05/23 08:39:25  brouard
   Summary: Code into subroutine, cleanings    Summary: Code into subroutine, cleanings
   
Line 3240  double ***hbxij(double ***po, int nhstep Line 3249  double ***hbxij(double ***po, int nhstep
       newm=savm;        newm=savm;
       /* Covariates have to be included here again */        /* Covariates have to be included here again */
       cov[1]=1.;        cov[1]=1.;
       agexact=age-((h-1)*hstepm + (d))*stepm/YEARM; /* age just before transition, d or d-1? */        agexact=age-( (h-1)*hstepm + (d)  )*stepm/YEARM; /* age just before transition, d or d-1? */
       /* agexact=age+((h-1)*hstepm + (d-1))*stepm/YEARM; /\* age just before transition *\/ */        /* agexact=age+((h-1)*hstepm + (d-1))*stepm/YEARM; /\* age just before transition *\/ */
       cov[2]=agexact;        cov[2]=agexact;
       if(nagesqr==1)        if(nagesqr==1)
Line 5464  void  concatwav(int wav[], int **dh, int Line 5473  void  concatwav(int wav[], int **dh, int
   /* hstepm beeing the number of stepms, if hstepm=1 the length of hstepm is stepm.     /* hstepm beeing the number of stepms, if hstepm=1 the length of hstepm is stepm. 
      nhstepm is the number of hstepm from age to agelim        nhstepm is the number of hstepm from age to agelim 
      nstepm is the number of stepm from age to agelin.        nstepm is the number of stepm from age to agelin. 
      Look at hpijx to understand the reason of that which relies in memory size       Look at hpijx to understand the reason which relies in memory size consideration
      and note for a fixed period like estepm months */       and note for a fixed period like estepm months */
   /* We decided (b) to get a life expectancy respecting the most precise curvature of the    /* We decided (b) to get a life expectancy respecting the most precise curvature of the
      survival function given by stepm (the optimization length). Unfortunately it       survival function given by stepm (the optimization length). Unfortunately it
Line 6924  true period expectancies (those weighted Line 6933  true period expectancies (those weighted
 }  }
   
 /******************* Gnuplot file **************/  /******************* Gnuplot file **************/
 void printinggnuplot(char fileresu[], char optionfilefiname[], double ageminpar, double agemaxpar, double fage , int prevfcast, int backcast, char pathc[], double p[], int offyear, int offbyear){  void printinggnuplot(char fileresu[], char optionfilefiname[], double ageminpar, double agemaxpar, double bage, double fage , int prevfcast, int backcast, char pathc[], double p[], int offyear, int offbyear){
   
   char dirfileres[132],optfileres[132];    char dirfileres[132],optfileres[132];
   char gplotcondition[132], gplotlabel[132];    char gplotcondition[132], gplotlabel[132];
Line 6933  void printinggnuplot(char fileresu[], ch Line 6942  void printinggnuplot(char fileresu[], ch
   int ng=0;    int ng=0;
   int vpopbased;    int vpopbased;
   int ioffset; /* variable offset for columns */    int ioffset; /* variable offset for columns */
     int iyearc=1; /* variable column for year of projection  */
     int iagec=1; /* variable column for age of projection  */
   int nres=0; /* Index of resultline */    int nres=0; /* Index of resultline */
   int istart=1; /* For starting graphs in projections */    int istart=1; /* For starting graphs in projections */
   
Line 7037  void printinggnuplot(char fileresu[], ch Line 7048  void printinggnuplot(char fileresu[], ch
                   
         fprintf(ficgp,"\" t\"\" w l lt 1,\"%s\" u 1:((",subdirf2(fileresu,"P_"));          fprintf(ficgp,"\" t\"\" w l lt 1,\"%s\" u 1:((",subdirf2(fileresu,"P_"));
         if(cptcoveff ==0){          if(cptcoveff ==0){
           fprintf(ficgp,"$%d)) t 'Observed prevalence in state %d' with line lt 3",      2+(cpt-1),  cpt );            fprintf(ficgp,"$%d)) t 'Observed prevalence in state %d' with line lt 3",      2+3*(cpt-1),  cpt );
         }else{          }else{
           kl=0;            kl=0;
           for (k=1; k<=cptcoveff; k++){    /* For each combination of covariate  */            for (k=1; k<=cptcoveff; k++){    /* For each combination of covariate  */
Line 7095  void printinggnuplot(char fileresu[], ch Line 7106  void printinggnuplot(char fileresu[], ch
               if (i==cpt) fprintf(ficgp," %%lf (%%lf)");                if (i==cpt) fprintf(ficgp," %%lf (%%lf)");
               else        fprintf(ficgp," %%*lf (%%*lf)");                else        fprintf(ficgp," %%*lf (%%*lf)");
             }              }
             fprintf(ficgp,"\" t\"Backward (stable) prevalence\" w l lt 0,\"%s\" every :::%d::%d u 1:($2==%d ? $3+1.96*$4 : 1/0) \"%%lf %%lf",subdirf2(fileresu,"VBL_"),nres-1,nres-1,nres);              fprintf(ficgp,"\" t\"Backward (stable) prevalence\" w l lt 6 dt 3,\"%s\" every :::%d::%d u 1:($2==%d ? $3+1.96*$4 : 1/0) \"%%lf %%lf",subdirf2(fileresu,"VBL_"),nres-1,nres-1,nres);
             for (i=1; i<= nlstate ; i ++) {              for (i=1; i<= nlstate ; i ++) {
               if (i==cpt) fprintf(ficgp," %%lf (%%lf)");                if (i==cpt) fprintf(ficgp," %%lf (%%lf)");
               else fprintf(ficgp," %%*lf (%%*lf)");                else fprintf(ficgp," %%*lf (%%*lf)");
             }               } 
             fprintf(ficgp,"\" t\"95%% CI\" w l lt 1,\"%s\" every :::%d::%d u 1:($2==%d ? $3-1.96*$4 : 1/0) \"%%lf %%lf",subdirf2(fileresu,"VBL_"),nres-1,nres-1,nres);               fprintf(ficgp,"\" t\"95%% CI\" w l lt 5,\"%s\" every :::%d::%d u 1:($2==%d ? $3-1.96*$4 : 1/0) \"%%lf %%lf",subdirf2(fileresu,"VBL_"),nres-1,nres-1,nres); 
             for (i=1; i<= nlstate ; i ++) {              for (i=1; i<= nlstate ; i ++) {
               if (i==cpt) fprintf(ficgp," %%lf (%%lf)");                if (i==cpt) fprintf(ficgp," %%lf (%%lf)");
               else fprintf(ficgp," %%*lf (%%*lf)");                else fprintf(ficgp," %%*lf (%%*lf)");
             }               } 
             fprintf(ficgp,"\" t\"\" w l lt 1");              fprintf(ficgp,"\" t\"\" w l lt 5");
           } /* end if backprojcast */            } /* end if backprojcast */
         } /* end if backcast */          } /* end if backcast */
         fprintf(ficgp,"\nset out ;unset label;\n");          fprintf(ficgp,"\nset out ;unset label;\n");
Line 7506  set ter svg size 640, 480\nunset log y\n Line 7517  set ter svg size 640, 480\nunset log y\n
             /*#  1    2        3   4   5  6    7  8   9   10  11  12  13  14  15  16  17  18 */              /*#  1    2        3   4   5  6    7  8   9   10  11  12  13  14  15  16  17  18 */
             fprintf(ficgp," u %d:(", ioffset);               fprintf(ficgp," u %d:(", ioffset); 
             if(i==nlstate+1){              if(i==nlstate+1){
               fprintf(ficgp," $%d/(1.-$%d)):5 t 'pw.%d' with line lc variable ",        \                fprintf(ficgp," $%d/(1.-$%d)):1 t 'pw.%d' with line lc variable ",        \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,cpt );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,cpt );
               fprintf(ficgp,",\\\n '' ");                fprintf(ficgp,",\\\n '' ");
               fprintf(ficgp," u %d:(",ioffset);                 fprintf(ficgp," u %d:(",ioffset); 
               fprintf(ficgp," (($5-$6) == %d ) ? $%d/(1.-$%d) : 1/0):5 with labels center not ", \                fprintf(ficgp," (($1-$2) == %d ) ? $%d/(1.-$%d) : 1/0):1 with labels center not ", \
                      offyear,                           \                       offyear,                           \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate );
             }else              }else
               fprintf(ficgp," $%d/(1.-$%d)) t 'p%d%d' with line ",      \                fprintf(ficgp," $%d/(1.-$%d)) t 'p%d%d' with line ",      \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,i,cpt );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,i,cpt );
           }else{ /* more than 2 covariates */            }else{ /* more than 2 covariates */
             if(cptcoveff ==1){              ioffset=2*cptcoveff+2; /* Age is in 4 or 6 or etc.*/
               ioffset=4; /* Age is in 4 */              /*#  V1  = 1  V2 =  0 yearproj age p11 p21 p.1 p12 p22 p.2 p13 p23 p.3*/
             }else{              /*#   1    2   3    4    5      6  7   8   9   10   11 12  13   14  15 */
               ioffset=6; /* Age is in 6 */              iyearc=ioffset-1;
               /*#  V1  = 1  V2 =  0 yearproj age p11 p21 p.1 p12 p22 p.2 p13 p23 p.3*/              iagec=ioffset;
               /*#   1    2   3    4    5      6  7   8   9   10   11 12  13   14  15 */  
             }     
             fprintf(ficgp," u %d:(",ioffset);               fprintf(ficgp," u %d:(",ioffset); 
             kl=0;              kl=0;
             strcpy(gplotcondition,"(");              strcpy(gplotcondition,"(");
Line 7545  set ter svg size 640, 480\nunset log y\n Line 7554  set ter svg size 640, 480\nunset log y\n
             /*6+1+(i-1)+(nlstate+1)*nlstate; 6+1+(1-1) +(2+1)*2=13 */               /*6+1+(i-1)+(nlstate+1)*nlstate; 6+1+(1-1) +(2+1)*2=13 */ 
             /* ''  u 6:(($1==1 && $2==0 && $3==2 && $4==0)? $9/(1.-$15) : 1/0):($5==2000? 3:2) t 'p.1' with line lc variable*/              /* ''  u 6:(($1==1 && $2==0 && $3==2 && $4==0)? $9/(1.-$15) : 1/0):($5==2000? 3:2) t 'p.1' with line lc variable*/
             if(i==nlstate+1){              if(i==nlstate+1){
               fprintf(ficgp,"%s ? $%d/(1.-$%d) : 1/0):5 t 'p.%d' with line lc variable", gplotcondition, \                fprintf(ficgp,"%s ? $%d/(1.-$%d) : 1/0):%d t 'p.%d' with line lc variable", gplotcondition, \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,cpt );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,iyearc, cpt );
               fprintf(ficgp,",\\\n '' ");                fprintf(ficgp,",\\\n '' ");
               fprintf(ficgp," u %d:(",ioffset);                 fprintf(ficgp," u %d:(",iagec); 
               fprintf(ficgp,"%s && (($5-$6) == %d ) ? $%d/(1.-$%d) : 1/0):5 with labels center not ", gplotcondition, \                fprintf(ficgp,"%s && (($%d-$%d) == %d ) ? $%d/(1.-$%d) : 1/0):%d with labels center not ", gplotcondition, \
                      offyear,                           \                        iyearc, iagec, offyear,                           \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate, iyearc );
 /*  '' u 6:(($1==1 && $2==0  && $3==2 && $4==0) && (($5-$6) == 1947) ? $10/(1.-$22) : 1/0):5 with labels center boxed not*/  /*  '' u 6:(($1==1 && $2==0  && $3==2 && $4==0) && (($5-$6) == 1947) ? $10/(1.-$22) : 1/0):5 with labels center boxed not*/
             }else{              }else{
               fprintf(ficgp,"%s ? $%d/(1.-$%d) : 1/0) t 'p%d%d' with line ", gplotcondition, \                fprintf(ficgp,"%s ? $%d/(1.-$%d) : 1/0) t 'p%d%d' with line ", gplotcondition, \
Line 7621  set ter svg size 640, 480\nunset log y\n Line 7630  set ter svg size 640, 480\nunset log y\n
             /*#  1    2        3   4   5  6    7  8   9   10  11  12  13  14  15  16  17  18 */              /*#  1    2        3   4   5  6    7  8   9   10  11  12  13  14  15  16  17  18 */
             fprintf(ficgp," u %d:(", ioffset);               fprintf(ficgp," u %d:(", ioffset); 
             if(i==nlstate+1){              if(i==nlstate+1){
               fprintf(ficgp," $%d/(1.-$%d)):5 t 'bw%d' with line lc variable ", \                fprintf(ficgp," $%d/(1.-$%d)):1 t 'bw%d' with line lc variable ", \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,cpt );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,cpt );
               fprintf(ficgp,",\\\n '' ");                fprintf(ficgp,",\\\n '' ");
               fprintf(ficgp," u %d:(",ioffset);                 fprintf(ficgp," u %d:(",ioffset); 
               fprintf(ficgp," (($5-$6) == %d ) ? $%d : 1/0):5 with labels center not ", \                fprintf(ficgp," (($1-$2) == %d ) ? $%d : 1/0):1 with labels center not ", \
                      offbyear,                          \                       offbyear,                          \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1) );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1) );
             }else              }else
               fprintf(ficgp," $%d/(1.-$%d)) t 'b%d%d' with line ",      \                fprintf(ficgp," $%d/(1.-$%d)) t 'b%d%d' with line ",      \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,cpt,i );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1),  ioffset+1+(i-1)+(nlstate+1)*nlstate,cpt,i );
           }else{ /* more than 2 covariates */            }else{ /* more than 2 covariates */
             if(cptcoveff ==1){              ioffset=2*cptcoveff+2; /* Age is in 4 or 6 or etc.*/
               ioffset=4; /* Age is in 4 */              /*#  V1  = 1  V2 =  0 yearproj age p11 p21 p.1 p12 p22 p.2 p13 p23 p.3*/
             }else{              /*#   1    2   3    4    5      6  7   8   9   10   11 12  13   14  15 */
               ioffset=6; /* Age is in 6 */              iyearc=ioffset-1;
               /*#  V1  = 1  V2 =  0 yearproj age p11 p21 p.1 p12 p22 p.2 p13 p23 p.3*/              iagec=ioffset;
               /*#   1    2   3    4    5      6  7   8   9   10   11 12  13   14  15 */  
             }     
             fprintf(ficgp," u %d:(",ioffset);               fprintf(ficgp," u %d:(",ioffset); 
             kl=0;              kl=0;
             strcpy(gplotcondition,"(");              strcpy(gplotcondition,"(");
Line 7660  set ter svg size 640, 480\nunset log y\n Line 7667  set ter svg size 640, 480\nunset log y\n
             /*6+1+(i-1)+(nlstate+1)*nlstate; 6+1+(1-1) +(2+1)*2=13 */               /*6+1+(i-1)+(nlstate+1)*nlstate; 6+1+(1-1) +(2+1)*2=13 */ 
             /* ''  u 6:(($1==1 && $2==0 && $3==2 && $4==0)? $9/(1.-$15) : 1/0):($5==2000? 3:2) t 'p.1' with line lc variable*/              /* ''  u 6:(($1==1 && $2==0 && $3==2 && $4==0)? $9/(1.-$15) : 1/0):($5==2000? 3:2) t 'p.1' with line lc variable*/
             if(i==nlstate+1){              if(i==nlstate+1){
               fprintf(ficgp,"%s ? $%d : 1/0):5 t 'bw%d' with line lc variable", gplotcondition, \                fprintf(ficgp,"%s ? $%d : 1/0):%d t 'bw%d' with line lc variable", gplotcondition, \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1),cpt );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1),iyearc,cpt );
               fprintf(ficgp,",\\\n '' ");                fprintf(ficgp,",\\\n '' ");
               fprintf(ficgp," u %d:(",ioffset);                 fprintf(ficgp," u %d:(",iagec); 
               /* fprintf(ficgp,"%s && (($5-$6) == %d ) ? $%d/(1.-$%d) : 1/0):5 with labels center not ", gplotcondition, \ */                /* fprintf(ficgp,"%s && (($5-$6) == %d ) ? $%d/(1.-$%d) : 1/0):5 with labels center not ", gplotcondition, \ */
               fprintf(ficgp,"%s && (($5-$6) == %d ) ? $%d : 1/0):5 with labels center not ", gplotcondition, \                fprintf(ficgp,"%s && (($%d-$%d) == %d ) ? $%d : 1/0):%d with labels center not ", gplotcondition, \
                      offbyear,                          \                        iyearc,iagec,offbyear,                            \
                       ioffset+(cpt-1)*(nlstate+1)+1+(i-1) );                        ioffset+(cpt-1)*(nlstate+1)+1+(i-1), iyearc );
 /*  '' u 6:(($1==1 && $2==0  && $3==2 && $4==0) && (($5-$6) == 1947) ? $10/(1.-$22) : 1/0):5 with labels center boxed not*/  /*  '' u 6:(($1==1 && $2==0  && $3==2 && $4==0) && (($5-$6) == 1947) ? $10/(1.-$22) : 1/0):5 with labels center boxed not*/
             }else{              }else{
               /* fprintf(ficgp,"%s ? $%d/(1.-$%d) : 1/0) t 'p%d%d' with line ", gplotcondition, \ */                /* fprintf(ficgp,"%s ? $%d/(1.-$%d) : 1/0) t 'p%d%d' with line ", gplotcondition, \ */
Line 8154  set ter svg size 640, 480\nunset log y\n Line 8161  set ter svg size 640, 480\nunset log y\n
   if(estepm < stepm){    if(estepm < stepm){
     printf ("Problem %d lower than %d\n",estepm, stepm);      printf ("Problem %d lower than %d\n",estepm, stepm);
   }    }
   else  hstepm=estepm;       else{
       hstepm=estepm;   
     }
     if(estepm > stepm){ /* Yes every two year */
       stepsize=2;
     }
   
   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 8199  set ter svg size 640, 480\nunset log y\n Line 8211  set ter svg size 640, 480\nunset log y\n
     for (yearp=0; yearp<=(anproj2-anproj1);yearp +=stepsize) {      for (yearp=0; yearp<=(anproj2-anproj1);yearp +=stepsize) {
       fprintf(ficresf,"\n");        fprintf(ficresf,"\n");
       fprintf(ficresf,"\n# Forecasting at date %.lf/%.lf/%.lf ",jproj1,mproj1,anproj1+yearp);           fprintf(ficresf,"\n# Forecasting at date %.lf/%.lf/%.lf ",jproj1,mproj1,anproj1+yearp);   
       for (agec=fage; agec>=(ageminpar-1); agec--){         /* for (agec=fage; agec>=(ageminpar-1); agec--){  */
         for (agec=fage; agec>=(bage); agec--){ 
         nhstepm=(int) rint((agelim-agec)*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);
Line 8287  set ter svg size 640, 480\nunset log y\n Line 8300  set ter svg size 640, 480\nunset log y\n
   if(estepm < stepm){    if(estepm < stepm){
     printf ("Problem %d lower than %d\n",estepm, stepm);      printf ("Problem %d lower than %d\n",estepm, stepm);
   }    }
   else  hstepm=estepm;    else{
       hstepm=estepm;   
     }
     if(estepm >= stepm){ /* Yes every two year */
       stepsize=2;
     }
       
   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 8333  set ter svg size 640, 480\nunset log y\n Line 8351  set ter svg size 640, 480\nunset log y\n
       /* for (yearp=0; yearp<=(anproj2-anproj1);yearp +=stepsize) {  */        /* for (yearp=0; yearp<=(anproj2-anproj1);yearp +=stepsize) {  */
       fprintf(ficresfb,"\n");        fprintf(ficresfb,"\n");
       fprintf(ficresfb,"\n# Back Forecasting at date %.lf/%.lf/%.lf ",jback1,mback1,anback1+yearp);        fprintf(ficresfb,"\n# Back Forecasting at date %.lf/%.lf/%.lf ",jback1,mback1,anback1+yearp);
       /* printf("\n# Back Forecasting at date %.lf/%.lf/%.lf ",jback1,mback1,anback1+yearp); */        printf("\n# Back Forecasting at date %.lf/%.lf/%.lf ",jback1,mback1,anback1+yearp);
       for (agec=bage; agec<=agemax-1; agec++){  /* testing */        /* for (agec=bage; agec<=agemax-1; agec++){  /\* testing *\/ */
         for (agec=bage; agec<=fage; agec++){  /* testing */
         /* We compute bij at age agec over nhstepm, nhstepm decreases when agec increases because of agemax;*/          /* We compute bij at age agec over nhstepm, nhstepm decreases when agec increases because of agemax;*/
         nhstepm=(int) rint((agec-agelim)*YEARM/stepm);          nhstepm=(int) (agec-agelim) *YEARM/stepm;/*     nhstepm=(int) rint((agec-agelim)*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;
         /* computes hbxij at age agec over 1 to nhstepm */          /* computes hbxij at age agec over 1 to nhstepm */
           /* printf("####prevbackforecast debug  agec=%.2f nhstepm=%d\n",agec, nhstepm);fflush(stdout); */
         hbxij(p3mat,nhstepm,agec,hstepm,p,prevacurrent,nlstate,stepm, k, nres);          hbxij(p3mat,nhstepm,agec,hstepm,p,prevacurrent,nlstate,stepm, k, nres);
         /* hpxij(p3mat,nhstepm,agec,hstepm,p,             nlstate,stepm,oldm,savm, k,nres); */          /* hpxij(p3mat,nhstepm,agec,hstepm,p,             nlstate,stepm,oldm,savm, k,nres); */
         /* Then we print p3mat for h corresponding to the right agec+h*stepms=yearp */          /* Then we print p3mat for h corresponding to the right agec+h*stepms=yearp */
Line 12071  Please run with mle=-1 to get a correct Line 12091  Please run with mle=-1 to get a correct
 This is probably because your parameter file doesn't \n  contain the exact number of lines (or columns) corresponding to your model line.\n\  This is probably because your parameter file doesn't \n  contain the exact number of lines (or columns) corresponding to your model line.\n\
 Please run with mle=-1 to get a correct covariance matrix.\n",ageminpar,agemaxpar);  Please run with mle=-1 to get a correct covariance matrix.\n",ageminpar,agemaxpar);
     }else{      }else{
       printinggnuplot(fileresu, optionfilefiname,ageminpar,agemaxpar,fage, prevfcast, backcast, pathc,p, (int)anproj1-(int)agemin, (int)anback1-(int)agemax+1);        /* printinggnuplot(fileresu, optionfilefiname,ageminpar,agemaxpar,fage, prevfcast, backcast, pathc,p, (int)anproj1-(int)agemin, (int)anback1-(int)agemax+1); */
         printinggnuplot(fileresu, optionfilefiname,ageminpar,agemaxpar,bage, fage, prevfcast, backcast, pathc,p, (int)anproj1-bage, (int)anback1-fage);
     }      }
     printinghtml(fileresu,title,datafile, firstpass, lastpass, stepm, weightopt, \      printinghtml(fileresu,title,datafile, firstpass, lastpass, stepm, weightopt, \
                  model,imx,jmin,jmax,jmean,rfileres,popforecast,mobilav,prevfcast,mobilavproj,backcast, estepm, \                   model,imx,jmin,jmax,jmean,rfileres,popforecast,mobilav,prevfcast,mobilavproj,backcast, estepm, \

Removed from v.1.269  
changed lines
  Added in v.1.272


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