Diff for /imach/src/imach.c between versions 1.76 and 1.77

version 1.76, 2003/05/16 10:44:42 version 1.77, 2003/05/16 16:49:47
Line 1775  void  concatwav(int wav[], int **dh, int Line 1775  void  concatwav(int wav[], int **dh, int
     wav[i]=mi;      wav[i]=mi;
     if(mi==0){      if(mi==0){
       if(first==0){        if(first==0){
         printf("Warning, no any valid information for:%d line=%d and may be others, see log file\n",num[i],i);          printf("Warning! None valid information for:%d line=%d (skipped) and may be others, see log file\n",num[i],i);
         first=1;          first=1;
       }        }
       if(first==1){        if(first==1){
         fprintf(ficlog,"Warning, no any valid information for:%d line=%d\n",num[i],i);          fprintf(ficlog,"Warning! None valid information for:%d line=%d (skipped)\n",num[i],i);
       }        }
     } /* end mi==0 */      } /* end mi==0 */
   }    } /* End individuals */
   
   for(i=1; i<=imx; i++){    for(i=1; i<=imx; i++){
     for(mi=1; mi<wav[i];mi++){      for(mi=1; mi<wav[i];mi++){
       if (stepm <=0)        if (stepm <=0)
         dh[mi][i]=1;          dh[mi][i]=1;
       else{        else{
         if (s[mw[mi+1][i]][i] > nlstate) {          if (s[mw[mi+1][i]][i] > nlstate) { /* A death */
           if (agedc[i] < 2*AGESUP) {            if (agedc[i] < 2*AGESUP) {
           j= rint(agedc[i]*12-agev[mw[mi][i]][i]*12);             j= rint(agedc[i]*12-agev[mw[mi][i]][i]*12); 
           if(j==0) j=1;  /* Survives at least one month after exam */            if(j==0) j=1;  /* Survives at least one month after exam */
Line 1797  void  concatwav(int wav[], int **dh, int Line 1797  void  concatwav(int wav[], int **dh, int
           if (j >= jmax) jmax=j;            if (j >= jmax) jmax=j;
           if (j <= jmin) jmin=j;            if (j <= jmin) jmin=j;
           sum=sum+j;            sum=sum+j;
           /*if (j<0) printf("j=%d num=%d \n",j,i); */            /*if (j<0) printf("j=%d num=%d \n",j,i);*/
           /*      printf("%d %d %d %d\n", s[mw[mi][i]][i] ,s[mw[mi+1][i]][i],j,i);*/            /*      printf("%d %d %d %d\n", s[mw[mi][i]][i] ,s[mw[mi+1][i]][i],j,i);*/
           /*printf("%d %lf %d %d %d\n", i,agev[mw[mi][i]][i],j,s[mw[mi][i]][i] ,s[mw[mi+1][i]][i]);*/            if(j<0)printf("Warning! Negative delay (%d) between waves %d and %d of individual at line %d who is aged %.1f with statuses %d %d\n ",j,mw[mi][i],mw[mi+1][i], i,agev[mw[mi][i]][i],s[mw[mi][i]][i] ,s[mw[mi+1][i]][i]);
           }            }
         }          }
         else{          else{
Line 1810  void  concatwav(int wav[], int **dh, int Line 1810  void  concatwav(int wav[], int **dh, int
           else if (j <= jmin)jmin=j;            else if (j <= jmin)jmin=j;
           /*        if (j<10) printf("j=%d jmin=%d num=%d ",j,jmin,i); */            /*        if (j<10) printf("j=%d jmin=%d num=%d ",j,jmin,i); */
           /*printf("%d %lf %d %d %d\n", i,agev[mw[mi][i]][i],j,s[mw[mi][i]][i] ,s[mw[mi+1][i]][i]);*/            /*printf("%d %lf %d %d %d\n", i,agev[mw[mi][i]][i],j,s[mw[mi][i]][i] ,s[mw[mi+1][i]][i]);*/
             if(j<0)printf("Warning! Negative delay (%d to death) between waves %d and %d of individual at line %d who is aged %.1f with statuses %d %d\n ",j,mw[mi][i],mw[mi+1][i], i,agev[mw[mi][i]][i],s[mw[mi][i]][i] ,s[mw[mi+1][i]][i]);
           sum=sum+j;            sum=sum+j;
         }          }
         jk= j/stepm;          jk= j/stepm;
Line 2011  void evsij(char fileres[], double ***eij Line 2012  void evsij(char fileres[], double ***eij
         for(i=1;i<=nlstate;i++){          for(i=1;i<=nlstate;i++){
           cptj=cptj+1;            cptj=cptj+1;
           for(h=0, gm[h][cptj]=0.; h<=nhstepm-1; h++){            for(h=0, gm[h][cptj]=0.; h<=nhstepm-1; h++){
   
             gm[h][cptj] = (p3mat[i][j][h]+p3mat[i][j][h+1])/2.;              gm[h][cptj] = (p3mat[i][j][h]+p3mat[i][j][h+1])/2.;
           }            }
         }          }
Line 3823  int main(int argc, char *argv[]) Line 3825  int main(int argc, char *argv[])
         s[m][i]=-1;          s[m][i]=-1;
       }        }
       if((int)moisdc[i]==99 && (int)andc[i]==9999 && s[m][i]>nlstate){        if((int)moisdc[i]==99 && (int)andc[i]==9999 && s[m][i]>nlstate){
         printf("Error! Date of death (month %2d and year %4d) of individual %d on line %d was unknown %d, set an arbitrary year of death\n",(int)moisdc[i],(int)andc[i],num[i],i);          printf("Error! Date of death (month %2d and year %4d) of individual %d on line %d was unknown, you must set an arbitrary year of death or he/she is skipped and results are biased\n",(int)moisdc[i],(int)andc[i],num[i],i);
         fprintf(ficlog,"Error! Date of death (month %2d and year %4d) of individual %d on line %d was unknown %d, set an arbitrary year of death\n",(int)moisdc[i],(int)andc[i],num[i],i);          fprintf(ficlog,"Error! Date of death (month %2d and year %4d) of individual %d on line %d was unknown, you must set an arbitrary year of death or he/she is skipped and results are biased\n",(int)moisdc[i],(int)andc[i],num[i],i);
         s[m][i]=-1;          s[m][i]=-1;
       }        }
       if((int)moisdc[i]==99 && (int)andc[i]!=9999 && s[m][i]>nlstate){        if((int)moisdc[i]==99 && (int)andc[i]!=9999 && s[m][i]>nlstate){
         printf("Warning! Month of death of individual %d on line %d was unknown %2d, we set it to June\n",num[i],i,(int)moisdc[i]);           printf("Error! Month of death of individual %d on line %d was unknown %2d, you should set it otherwise the information on the death is skipped and results are biased.\n",num[i],i,(int)moisdc[i]); 
         fprintf(ficlog,"Warning! Month of death of individual %d on line %d was unknown %f, we set it to June\n",num[i],i,moisdc[i]);           fprintf(ficlog,"Error! Month of death of individual %d on line %d was unknown %f, you should set it otherwise the information on the death is skipped and results are biased.\n",num[i],i,moisdc[i]); 
         moisdc[i]=6;  
         s[m][i]=-1;          s[m][i]=-1;
       }        }
     }      }
Line 4155  int main(int argc, char *argv[]) Line 4156  int main(int argc, char *argv[])
 Title=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>\n  Title=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>\n
 \n  \n
 Total number of observations=%d <br>\n  Total number of observations=%d <br>\n
 Youngest age at first pass %.2f, oldest age %.2f<br>\n  Youngest age at first (selected) pass %.2f, oldest age %.2f<br>\n
 Interval (in months) between two waves: Min=%d Max=%d Mean=%.2lf<br>\n  Interval (in months) between two waves: Min=%d Max=%d Mean=%.2lf<br>\n
 <hr  size=\"2\" color=\"#EC5E5E\">  <hr  size=\"2\" color=\"#EC5E5E\">
  <ul><li><h4>Parameter files</h4>\n   <ul><li><h4>Parameter files</h4>\n

Removed from v.1.76  
changed lines
  Added in v.1.77


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