--- imach/src/imach.c 2006/01/05 20:23:19 1.105 +++ imach/src/imach.c 2006/01/19 13:24:36 1.106 @@ -1,6 +1,9 @@ -/* $Id: imach.c,v 1.105 2006/01/05 20:23:19 lievre Exp $ +/* $Id: imach.c,v 1.106 2006/01/19 13:24:36 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.106 2006/01/19 13:24:36 brouard + Some cleaning and links added in html output + Revision 1.105 2006/01/05 20:23:19 lievre *** empty log message *** @@ -221,6 +224,7 @@ #include #include #include +#include #include /* #include */ @@ -259,11 +263,11 @@ #define ODIRSEPARATOR '/' #endif -/* $Id: imach.c,v 1.105 2006/01/05 20:23:19 lievre Exp $ */ +/* $Id: imach.c,v 1.106 2006/01/19 13:24:36 brouard Exp $ */ /* $State: Exp $ */ -char version[]="Imach version 0.98, September 2005, INED-EUROREVES "; -char fullversion[]="$Revision: 1.105 $ $Date: 2006/01/05 20:23:19 $"; +char version[]="Imach version 0.98a, January 2006, INED-EUROREVES "; +char fullversion[]="$Revision: 1.106 $ $Date: 2006/01/19 13:24:36 $"; int erreur, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ int nvar; int cptcovn=0, cptcovage=0, cptcoveff=0,cptcov; @@ -2556,7 +2560,7 @@ void varevsij(char optionfilefiname[], d } fprintf(ficresprobmorprev,"\n"); fprintf(ficgp,"\n# Routine varevsij"); - fprintf(fichtm, "#Local time at start: %s", strstart); + /* fprintf(fichtm, "#Local time at start: %s", strstart);*/ fprintf(fichtm,"\n
  • Computing probabilities of dying over estepm months as a weighted average (i.e global mortality independent of initial healh state)

  • \n"); fprintf(fichtm,"\n
    %s
    \n",digitp); /* } */ @@ -3199,7 +3203,10 @@ void printinghtml(char fileres[], char t double jprev2, double mprev2,double anprev2){ int jj1, k1, i1, cpt; - fprintf(fichtm,"
    • Result files (first order: no variance)

      \n \ + fprintf(fichtm,""); + fprintf(fichtm,"
      • Result files (first order: no variance)

        \n \ - Observed prevalence in each state (during the period defined between %.lf/%.lf/%.lf and %.lf/%.lf/%.lf): %s
        \n ", jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,subdirf2(fileres,"p"),subdirf2(fileres,"p")); fprintf(fichtm,"\ @@ -3250,7 +3257,7 @@ fprintf(fichtm," \n
        • Graphs fprintf(fichtm,"\ -\n
        • Result files (second order: variances)

          \n\ +\n
        • Result files (second order: variances)

          \n\ - Parameter file with estimated parameters and covariance matrix: %s
          \n", rfileres,rfileres); fprintf(fichtm," - Variance of one-step probabilities: %s
          \n", @@ -4009,7 +4016,7 @@ void printinghtmlmort(char fileres[], ch fprintf(fichtm,"
          • Life table

            \n
            "); - fprintf(fichtm,"\nAge lx qx dx Lx Tx e(x)
            "); + fprintf(fichtm,"\nAge lx qx d(x,x+1) Lx Tx e
            "); for (k=agegomp;k<(agemortsup-2);k++) fprintf(fichtm,"%d %.0lf %lf %.0lf %.0lf %.0lf %lf
            \n",k,lsurv[k],p[1]*exp(p[2]*(k-agegomp)),(p[1]*exp(p[2]*(k-agegomp)))*lsurv[k],lpop[k],tpop[k],tpop[k]/lsurv[k]); @@ -4504,12 +4511,12 @@ int main(int argc, char *argv[]) if (s[4][i]==9) s[4][i]=-1; printf("%ld %.lf %.lf %.lf %.lf/%.lf %.lf/%.lf %.lf/%.lf %d %.lf/%.lf %d %.lf/%.lf %d %.lf/%.lf %d\n",num[i],(covar[1][i]), (covar[2][i]), (weight[i]), (moisnais[i]), (annais[i]), (moisdc[i]), (andc[i]), (mint[1][i]), (anint[1][i]), (s[1][i]), (mint[2][i]), (anint[2][i]), (s[2][i]), (mint[3][i]), (anint[3][i]), (s[3][i]), (mint[4][i]), (anint[4][i]), (s[4][i]));}*/ - for (i=1; i<=imx; i++) + /* for (i=1; i<=imx; i++) */ /*if ((s[3][i]==3) || (s[4][i]==3)) weight[i]=0.08; else weight[i]=1;*/ - /* Calculation of the number of parameter from char model*/ + /* Calculation of the number of parameters from char model */ Tvar=ivector(1,15); /* stores the number n of the covariates in Vm+Vn at 1 and m at 2 */ Tprod=ivector(1,15); Tvaraff=ivector(1,15);