--- imach/src/imach.c 2002/05/24 13:01:48 1.44 +++ imach/src/imach.c 2002/05/24 16:34:18 1.45 @@ -1,4 +1,4 @@ -/* $Id: imach.c,v 1.44 2002/05/24 13:01:48 brouard Exp $ +/* $Id: imach.c,v 1.45 2002/05/24 16:34:18 lievre Exp $ Interpolated Markov Chain Short summary of the programme: @@ -2059,12 +2059,13 @@ fprintf(ficresprob,"#One-step probabilit } + /******************* Printing html file ***********/ void printinghtml(char fileres[], char title[], char datafile[], int firstpass, \ int lastpass, int stepm, int weightopt, char model[],\ int imx,int jmin, int jmax, double jmeanint,char optionfile[], \ char optionfilehtm[],char rfileres[], char optionfilegnuplot[],\ - char version[], int popforecast, int estepm ,/* \ */ + char version[], int popforecast, int estepm ,\ double jprev1, double mprev1,double anprev1, \ double jprev2, double mprev2,double anprev2){ int jj1, k1, i1, cpt; @@ -2116,19 +2117,19 @@ fprintf(fichtm,"
  • Graphs
  • "); jj1=0; for(k1=1; k1<=m;k1++){ for(i1=1; i1<=ncodemax[k1];i1++){ - jj1++; - if (cptcovn > 0) { - fprintf(fichtm,"


    ************ Results for covariates"); - for (cpt=1; cpt<=cptcoveff;cpt++) - fprintf(fichtm," V%d=%d ",Tvaraff[cpt],nbcode[Tvaraff[cpt]][codtab[jj1][cpt]]); - fprintf(fichtm," ************\n
    "); - } - /* Pij */ - fprintf(fichtm,"
    - Pij or Conditional probabilities to be observed in state j being in state i %d (stepm) months before: pe%s%d1.png
    -",strtok(optionfile, "."),jj1,stepm,strtok(optionfile, "."),jj1); - /* Quasi-incidences */ - fprintf(fichtm,"
    - Pij or Conditional probabilities to be observed in state j being in state i %d (stepm) months before but expressed in per year i.e. quasi incidences if stepm is small and probabilities too: pe%s%d2.png
    -",strtok(optionfile, "."),jj1,stepm,strtok(optionfile, "."),jj1); + jj1++; + if (cptcovn > 0) { + fprintf(fichtm,"
    ************ Results for covariates"); + for (cpt=1; cpt<=cptcoveff;cpt++) + fprintf(fichtm," V%d=%d ",Tvaraff[cpt],nbcode[Tvaraff[cpt]][codtab[jj1][cpt]]); + fprintf(fichtm," ************\n
    "); + } + /* Pij */ + fprintf(fichtm,"
    - Pij or Conditional probabilities to be observed in state j being in state i %d (stepm) months before: pe%s%d1.png
    +",stepm,strtok(optionfile, "."),jj1,strtok(optionfile, "."),jj1); + /* Quasi-incidences */ + fprintf(fichtm,"
    - Pij or Conditional probabilities to be observed in state j being in state i %d (stepm) months before but expressed in per year i.e. quasi incidences if stepm is small and probabilities too: pe%s%d2.png
    +",stepm,strtok(optionfile, "."),jj1,strtok(optionfile, "."),jj1); /* Stable prevalence in each health state */ for(cpt=1; cpt- Stable prevalence in each health state : p%s%d%d.png
    @@ -2148,7 +2149,7 @@ health expectancies in states (1) and (2 ",strtok(optionfile, "."),jj1,strtok(optionfile, "."),jj1); fprintf(fichtm,"\n"); } - } + } fclose(fichtm); } @@ -2674,7 +2675,7 @@ int main(int argc, char *argv[]) double dateprev1, dateprev2,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2; - char version[80]="Imach version 0.8e, May 2002, INED-EUROREVES "; + char version[80]="Imach version 0.8f, May 2002, INED-EUROREVES "; char *alph[]={"a","a","b","c","d","e"}, str[4]; @@ -3285,7 +3286,7 @@ while((c=getc(ficpar))=='#' && c!= EOF){ /*--------- index.htm --------*/ - printinghtml(fileres,title,datafile, firstpass, lastpass, stepm, weightopt,model,imx,jmin,jmax,jmean,optionfile,optionfilehtm,rfileres,optionfilegnuplot,version,popforecast,estepm,jprev1,mprev1,anprev1,jprev2,mprev2,anprev2); + printinghtml(fileres,title,datafile, firstpass, lastpass, stepm, weightopt,model,imx,jmin,jmax,jmean,optionfile,optionfilehtm,rfileres,optionfilegnuplot,version,popforecast,estepm,jprev1,mprev1,anprev1,jprev2,mprev2,anprev2); /*--------------- Prevalence limit --------------*/