Diff for /imach/src/imach.c between versions 1.345 and 1.347

version 1.345, 2022/09/16 13:40:11 version 1.347, 2022/09/18 14:36:44
Line 1 Line 1
 /* $Id$  /* $Id$
   $State$    $State$
   $Log$    $Log$
     Revision 1.347  2022/09/18 14:36:44  brouard
     Summary: version 0.99r42
   
     Revision 1.346  2022/09/16 13:52:36  brouard
     * src/imach.c (Module): 0.99r41 Was an error when product of timevarying and fixed. Using FixedV[of name] now. Thank you  Feinuo
   
   Revision 1.345  2022/09/16 13:40:11  brouard    Revision 1.345  2022/09/16 13:40:11  brouard
   Summary: Version 0.99r41    Summary: Version 0.99r41
   
Line 4390  double funcone( double *x) Line 4396  double funcone( double *x)
       * TvarFind[k]     1   0     0     0         0        0        0       0        0        * TvarFind[k]     1   0     0     0         0        0        0       0        0
       */        */
       /* Other model ncovcol=5 nqv=0 ntv=3 nqtv=0 nlstate=3        /* Other model ncovcol=5 nqv=0 ntv=3 nqtv=0 nlstate=3
        /* V2 V3 V4 are fixed V6 V7 are timevarying so V8 and V5 are not in the model and product column will start at 9 Tvar[4]=6         * V2 V3 V4 are fixed V6 V7 are timevarying so V8 and V5 are not in the model and product column will start at 9 Tvar[4]=6
         * FixedV[ncovcol+qv+ntv+nqtv]       V5          * FixedV[ncovcol+qv+ntv+nqtv]       V5
         *             V1  V2     V3    V4   V5 V6     V7  V8          *             V1  V2     V3    V4   V5 V6     V7  V8
         *             0   0      0      0    0  1      1   1           *             0   0      0      0    0  1      1   1 
Line 8221  void printinggnuplot(char fileresu[], ch Line 8227  void printinggnuplot(char fileresu[], ch
   fprintf(ficgp,"\nset ter pngcairo size 640, 480");    fprintf(ficgp,"\nset ter pngcairo size 640, 480");
   /* if(debugILK==1){ */    /* if(debugILK==1){ */
   for(kf=1; kf <= ncovf; kf++){ /* For each simple dummy covariate of the model */    for(kf=1; kf <= ncovf; kf++){ /* For each simple dummy covariate of the model */
     kvar=Tvar[TvarFind[kf]]; /* variable */      kvar=Tvar[TvarFind[kf]]; /* variable name */
     k=18+Tvar[TvarFind[kf]];/*offset because there are 18 columns in the ILK_ file */      /* k=18+Tvar[TvarFind[kf]];/\*offset because there are 18 columns in the ILK_ file but could be placed else where *\/ */
       k=18+kf;/*offset because there are 18 columns in the ILK_ file */
     for (i=1; i<= nlstate ; i ++) {      for (i=1; i<= nlstate ; i ++) {
       fprintf(ficgp,"\nset out \"%s-p%dj-%d.png\";set ylabel \"Probability for each individual/wave\";",subdirf2(optionfilefiname,"ILK_"),i,kvar);        fprintf(ficgp,"\nset out \"%s-p%dj-%d.png\";set ylabel \"Probability for each individual/wave\";",subdirf2(optionfilefiname,"ILK_"),i,kvar);
       fprintf(ficgp,"unset log;\n# For each simple dummy covariate of the model \n plot  \"%s\"",subdirf(fileresilk));        fprintf(ficgp,"unset log;\n# For each simple dummy covariate of the model \n plot  \"%s\"",subdirf(fileresilk));
Line 10647  int readdata(char datafile[], int firsto Line 10654  int readdata(char datafile[], int firsto
         errno=0;          errno=0;
         lval=strtol(strb,&endptr,10);           lval=strtol(strb,&endptr,10); 
         /*      if (errno == ERANGE && (lval == LONG_MAX || lval == LONG_MIN))*/          /*      if (errno == ERANGE && (lval == LONG_MAX || lval == LONG_MIN))*/
         if( strb[0]=='\0' || (*endptr != '\0')){          if( strb[0]=='\0' || (*endptr != '\0' )){
           printf("Error reading data around '%s' at line number %d for individual %d, '%s'\nShould be a status of wave %d. Setting maxwav=%d might be wrong.  Exiting.\n", strb, linei,i,line,j,maxwav);            printf("Error reading data around '%s' at line number %d for individual %d, '%s'\nShould be a status of wave %d. Setting maxwav=%d might be wrong. Exiting.\n", strb, linei,i,line,j,maxwav);
           fprintf(ficlog,"Error reading data around '%s' at line number %d for individual %d, '%s'\nShould be a status of wave %d. Setting maxwav=%d might be wrong.  Exiting.\n", strb, linei,i,line,j,maxwav);fflush(ficlog);            fprintf(ficlog,"Error reading data around '%s' at line number %d for individual %d, '%s'\nShould be a status of wave %d. Setting maxwav=%d might be wrong. Exiting.\n", strb, linei,i,line,j,maxwav);fflush(ficlog);
             return 1;
           }else if( lval==0 || lval > nlstate+ndeath){
             printf("Error in data around '%s' at line number %d for individual %d, '%s'\n Should be a state at wave %d. A state should be 1 to %d and not %d.\n Fix your data file '%s'!  Exiting.\n", strb, linei,i,line,j,nlstate+ndeath, lval, datafile);fflush(stdout);
             fprintf(ficlog,"Error in data around '%s' at line number %d for individual %d, '%s'\n Should be a state at wave %d. A state should be 1 to %d and not %d.\n Fix your data file '%s'!  Exiting.\n", strb, linei,i,line,j,nlstate+ndeath, lval, datafile); fflush(ficlog);
           return 1;            return 1;
         }          }
       }        }

Removed from v.1.345  
changed lines
  Added in v.1.347


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