--- imach/src/imach.c 2017/04/24 15:23:15 1.263 +++ imach/src/imach.c 2017/04/26 06:01:29 1.264 @@ -1,6 +1,9 @@ -/* $Id: imach.c,v 1.263 2017/04/24 15:23:15 brouard Exp $ +/* $Id: imach.c,v 1.264 2017/04/26 06:01:29 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.264 2017/04/26 06:01:29 brouard + Summary: Labels in graphs + Revision 1.263 2017/04/24 15:23:15 brouard Summary: to save @@ -991,12 +994,12 @@ typedef struct { #define ODIRSEPARATOR '\\' #endif -/* $Id: imach.c,v 1.263 2017/04/24 15:23:15 brouard Exp $ */ +/* $Id: imach.c,v 1.264 2017/04/26 06:01:29 brouard Exp $ */ /* $State: Exp $ */ #include "version.h" char version[]=__IMACH_VERSION__; char copyright[]="February 2016,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2018"; -char fullversion[]="$Revision: 1.263 $ $Date: 2017/04/24 15:23:15 $"; +char fullversion[]="$Revision: 1.264 $ $Date: 2017/04/26 06:01:29 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -2615,7 +2618,7 @@ Earliest age to start was %d-%d=%d, ncvl /* double **bprevalim(double **bprlim, double ***prevacurrent, int nlstate, double x[], double age, double **oldm, double **savm, double **dnewm, double **doldm, double **dsavm, double ftolpl, int *ncvyear, int ij) */ double **bprevalim(double **bprlim, double ***prevacurrent, int nlstate, double x[], double age, double ftolpl, int *ncvyear, int ij, int nres) { - /* Computes the prevalence limit in each live state at age x and covariate ij by left multiplying the unit + /* Computes the prevalence limit in each live state at age x and for covariate combination ij (<=2**cptcoveff) by left multiplying the unit matrix by transitions matrix until convergence is reached with precision ftolpl */ /* Wx= Wx-1 Px-1= Wx-2 Px-2 Px-1 = Wx-n Px-n ... Px-2 Px-1 I */ /* Wx is row vector: population in state 1, population in state 2, population dead */ @@ -2676,7 +2679,7 @@ Earliest age to start was %d-%d=%d, ncvl for (k=1; k<=nsd;k++) { /* For single dummy covariates only */ /* Here comes the value of the covariate 'ij' after renumbering k with single dummy covariates */ cov[2+nagesqr+TvarsDind[k]]=nbcode[TvarsD[k]][codtabm(ij,k)]; - /* printf("bprevalim Dummy combi=%d k=%d TvarsD[%d]=V%d TvarsDind[%d]=%d nbcode=%d cov=%lf codtabm(%d,Tvar[%d])=%d \n",ij,k, k, TvarsD[k],k,TvarsDind[k],nbcode[TvarsD[k]][codtabm(ij,k)],cov[2+nagesqr+TvarsDind[k]], ij, k, codtabm(ij,k)); */ + /* printf("bprevalim Dummy agefin=%.0f combi=%d k=%d TvarsD[%d]=V%d TvarsDind[%d]=%d nbcode=%d cov[%d]=%lf codtabm(%d,Tvar[%d])=%d \n",agefin,ij,k, k, TvarsD[k],k,TvarsDind[k],nbcode[TvarsD[k]][codtabm(ij,k)],2+nagesqr+TvarsDind[k],cov[2+nagesqr+TvarsDind[k]], ij, k, codtabm(ij,k)); */ } /* for (k=1; k<=cptcovn;k++) { */ /* /\* cov[2+nagesqr+k]=nbcode[Tvar[k]][codtabm(ij,Tvar[k])]; *\/ */ @@ -4619,6 +4622,8 @@ Title=%s
Datafile=%s Firstpass=%d La if( iage <= iagemax){ if(pos>=1.e-5){ fprintf(ficresp," %d %.5f %.0f %.0f",iage,prop[jk][iage]/pospropta, prop[jk][iage],pospropta); + /* fprintf(ficresp, "%d %d %d %.5f %.0f %.0f",Tvaraff[z1],nbcode[Tvaraff[z1]][codtabm(j1,z1)],iage,prop[jk][iage]/pospropta, prop[jk][iage],pospropta); */ + fprintf(ficresphtm,"%d%.5f%.0f%.0f",iage,prop[jk][iage]/pospropta, prop[jk][iage],pospropta); /*probs[iage][jk][j1]= pp[jk]/pos;*/ /*printf("\niage=%d jk=%d j1=%d %.5f %.0f %.0f %f",iage,jk,j1,pp[jk]/pos, pp[jk],pos,probs[iage][jk][j1]);*/ @@ -6435,11 +6440,47 @@ void printinghtml(char fileresu[], char %s
\n", subdirf2(fileresu,"F_"),subdirf2(fileresu,"F_")); } - fprintf(fichtm," \n