Diff for /imach064/src/imach.c between versions 1.9 and 1.11

version 1.9, 2001/05/02 18:44:18 version 1.11, 2001/05/17 16:07:14
Line 8 Line 8
   Health expectancies are computed from the transistions observed between    Health expectancies are computed from the transistions observed between
   waves and are computed for each degree of severity of disability (number    waves and are computed for each degree of severity of disability (number
   of life states). More degrees you consider, more time is necessary to    of life states). More degrees you consider, more time is necessary to
   reach the Maximum Likelihood of the parameters involved in the model.    reach the Maximum Likelihood of the parameters involved in the model.
   The simplest model is the multinomial logistic model where pij is    The simplest model is the multinomial logistic model where pij is
   the probabibility to be observed in state j at the second wave conditional    the probabibility to be observed in state j at the second wave conditional
   to be observed in state i at the first wave. Therefore the model is:    to be observed in state i at the first wave. Therefore the model is:
Line 1270  void  concatwav(int wav[], int **dh, int Line 1270  void  concatwav(int wav[], int **dh, int
   /* int j, k=0,jk, ju, jl,jmin=1e+5, jmax=-1;    /* int j, k=0,jk, ju, jl,jmin=1e+5, jmax=-1;
      double sum=0., jmean=0.;*/       double sum=0., jmean=0.;*/
   
 int j, k=0,jk, ju, jl;    int j, k=0,jk, ju, jl;
      double sum=0.;    double sum=0.;
 jmin=1e+5;    jmin=1e+5;
  jmax=-1;    jmax=-1;
 jmean=0.;    jmean=0.;
   for(i=1; i<=imx; i++){    for(i=1; i<=imx; i++){
     mi=0;      mi=0;
     m=firstpass;      m=firstpass;
Line 1304  jmean=0.; Line 1304  jmean=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) {
             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>28)) printf("j=%d num=%d ",j,i);*/  
           if(j==0) j=1;  /* Survives at least one month after exam */            if(j==0) j=1;  /* Survives at least one month after exam */
           k=k+1;            k=k+1;
           if (j >= jmax) jmax=j;            if (j >= jmax) jmax=j;
           else if (j <= jmin)jmin=j;            if (j <= jmin) jmin=j;
           sum=sum+j;            sum=sum+j;
             if (j<0) printf("j=%d num=%d ",j,i);
             }
         }          }
         else{          else{
           j= rint( (agev[mw[mi+1][i]][i]*12 - agev[mw[mi][i]][i]*12));            j= rint( (agev[mw[mi+1][i]][i]*12 - agev[mw[mi][i]][i]*12));
           /*if ((j<0) || (j>28)) printf("j=%d num=%d ",j,i);*/  
           k=k+1;            k=k+1;
           if (j >= jmax) jmax=j;            if (j >= jmax) jmax=j;
           else if (j <= jmin)jmin=j;            else if (j <= jmin)jmin=j;
Line 1676  int main() Line 1677  int main()
   double ***eij, ***vareij;    double ***eij, ***vareij;
   double **varpl; /* Variances of prevalence limits by age */    double **varpl; /* Variances of prevalence limits by age */
   double *epj, vepp;    double *epj, vepp;
   char version[80]="Imach version 62c, May 1999, INED-EUROREVES ";    char version[80]="Imach version 64b, May 2001, INED-EUROREVES ";
   char *alph[]={"a","a","b","c","d","e"}, str[4];    char *alph[]={"a","a","b","c","d","e"}, str[4];
   
   char z[1]="c", occ;    char z[1]="c", occ;
Line 2670  strcpy(fileresvpl,"vpl"); Line 2671  strcpy(fileresvpl,"vpl");
  chdir(pathcd);   chdir(pathcd);
 #endif  #endif
  /*system("wgnuplot graph.plt");*/   /*system("wgnuplot graph.plt");*/
  system("../gp37mgw/wgnuplot graph.plt");   /*system("../gp37mgw/wgnuplot graph.plt");*/
    /*system("cd ../gp37mgw");*/
    system("..\\gp37mgw\\wgnuplot graph.plt");
   
 #ifdef windows  #ifdef windows
   while (z[0] != 'q') {    while (z[0] != 'q') {
Line 2680  strcpy(fileresvpl,"vpl"); Line 2683  strcpy(fileresvpl,"vpl");
     if (z[0] == 'c') system("./imach");      if (z[0] == 'c') system("./imach");
     else if (z[0] == 'e') {      else if (z[0] == 'e') {
       chdir(path);        chdir(path);
       system("index.htm");        system(optionfilehtm);
     }      }
     else if (z[0] == 'q') exit(0);      else if (z[0] == 'q') exit(0);
   }    }

Removed from v.1.9  
changed lines
  Added in v.1.11


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