|
|
| version 1.141, 2014/01/26 02:42:01 | version 1.142, 2014/01/26 03:57:36 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ | /* $Id$ |
| $State$ | $State$ |
| $Log$ | $Log$ |
| Revision 1.142 2014/01/26 03:57:36 brouard | |
| Summary: gnuplot changed plot w l 1 has to be changed to plot w l lt 2 | |
| * imach.c (Module): Trying to merge old staffs together while being at Tokyo. Not tested... | |
| Revision 1.141 2014/01/26 02:42:01 brouard | Revision 1.141 2014/01/26 02:42:01 brouard |
| * imach.c (Module): Trying to merge old staffs together while being at Tokyo. Not tested... | * imach.c (Module): Trying to merge old staffs together while being at Tokyo. Not tested... |
| Line 443 extern int errno; | Line 448 extern int errno; |
| /* $Id$ */ | /* $Id$ */ |
| /* $State$ */ | /* $State$ */ |
| char version[]="Imach version 0.98n, January 2014,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Sicentific Research 25293121)"; | char version[]="Imach version 0.98nR, January 2014,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121)"; |
| char fullversion[]="$Revision$ $Date$"; | char fullversion[]="$Revision$ $Date$"; |
| char strstart[80]; | char strstart[80]; |
| char optionfilext[10], optionfilefiname[FILENAMELENGTH]; | char optionfilext[10], optionfilefiname[FILENAMELENGTH]; |
| Line 1295 double **prevalim(double **prlim, int nl | Line 1300 double **prevalim(double **prlim, int nl |
| /*printf("ij=%d cptcovprod=%d tvar=%d ", ij, cptcovprod, Tvar[1]);*/ | /*printf("ij=%d cptcovprod=%d tvar=%d ", ij, cptcovprod, Tvar[1]);*/ |
| /*printf("ij=%d cov[3]=%lf cov[4]=%lf \n",ij, cov[3],cov[4]);*/ | /*printf("ij=%d cov[3]=%lf cov[4]=%lf \n",ij, cov[3],cov[4]);*/ |
| /*printf("ij=%d cov[3]=%lf \n",ij, cov[3]);*/ | /*printf("ij=%d cov[3]=%lf \n",ij, cov[3]);*/ |
| out=matprod2(newm, pmij(pmmij,cov,ncovmodel,x,nlstate),1,nlstate+ndeath,1,nlstate+ndeath,1,nlstate+ndeath, oldm); | out=matprod2(newm, pmij(pmmij,cov,ncovmodel,x,nlstate),1,nlstate+ndeath,1,nlstate+ndeath,1,nlstate+ndeath, oldm); /* Bug Valgrind */ |
| savm=oldm; | savm=oldm; |
| oldm=newm; | oldm=newm; |
| Line 3225 void varevsij(char optionfilefiname[], d | Line 3230 void varevsij(char optionfilefiname[], d |
| /* fprintf(ficgp,"\n plot \"%s\" u 1:($3*%6.3f) not w l 1 ",fileresprobmorprev,YEARM/estepm); */ | /* fprintf(ficgp,"\n plot \"%s\" u 1:($3*%6.3f) not w l 1 ",fileresprobmorprev,YEARM/estepm); */ |
| /* fprintf(ficgp,"\n replot \"%s\" u 1:(($3+1.96*$4)*%6.3f) t \"95\%% interval\" w l 2 ",fileresprobmorprev,YEARM/estepm); */ | /* fprintf(ficgp,"\n replot \"%s\" u 1:(($3+1.96*$4)*%6.3f) t \"95\%% interval\" w l 2 ",fileresprobmorprev,YEARM/estepm); */ |
| /* fprintf(ficgp,"\n replot \"%s\" u 1:(($3-1.96*$4)*%6.3f) not w l 2 ",fileresprobmorprev,YEARM/estepm); */ | /* fprintf(ficgp,"\n replot \"%s\" u 1:(($3-1.96*$4)*%6.3f) not w l 2 ",fileresprobmorprev,YEARM/estepm); */ |
| fprintf(ficgp,"\n plot \"%s\" u 1:($3) not w l 1 ",subdirf(fileresprobmorprev)); | fprintf(ficgp,"\n plot \"%s\" u 1:($3) not w l lt 2 ",subdirf(fileresprobmorprev)); |
| fprintf(ficgp,"\n replot \"%s\" u 1:(($3+1.96*$4)) t \"95\%% interval\" w l 2 ",subdirf(fileresprobmorprev)); | fprintf(ficgp,"\n replot \"%s\" u 1:(($3+1.96*$4)) t \"95\%% interval\" w l lt 3 ",subdirf(fileresprobmorprev)); |
| fprintf(ficgp,"\n replot \"%s\" u 1:(($3-1.96*$4)) not w l 2 ",subdirf(fileresprobmorprev)); | fprintf(ficgp,"\n replot \"%s\" u 1:(($3-1.96*$4)) not w l lt 3 ",subdirf(fileresprobmorprev)); |
| fprintf(fichtm,"\n<br> File (multiple files are possible if covariates are present): <A href=\"%s\">%s</a>\n",subdirf(fileresprobmorprev),subdirf(fileresprobmorprev)); | fprintf(fichtm,"\n<br> File (multiple files are possible if covariates are present): <A href=\"%s\">%s</a>\n",subdirf(fileresprobmorprev),subdirf(fileresprobmorprev)); |
| fprintf(fichtm,"\n<br> Probability is computed over estepm=%d months. <br> <img src=\"%s%s.png\"> <br>\n", estepm,subdirf3(optionfilefiname,"varmuptjgr",digitp),digit); | fprintf(fichtm,"\n<br> Probability is computed over estepm=%d months. <br> <img src=\"%s%s.png\"> <br>\n", estepm,subdirf3(optionfilefiname,"varmuptjgr",digitp),digit); |
| /* fprintf(fichtm,"\n<br> Probability is computed over estepm=%d months and then divided by estepm and multiplied by %.0f in order to have the probability to die over a year <br> <img src=\"varmuptjgr%s%s.png\"> <br>\n", stepm,YEARM,digitp,digit); | /* fprintf(fichtm,"\n<br> Probability is computed over estepm=%d months and then divided by estepm and multiplied by %.0f in order to have the probability to die over a year <br> <img src=\"varmuptjgr%s%s.png\"> <br>\n", stepm,YEARM,digitp,digit); |
| Line 3822 plot [%.f:%.f] \"%s\" every :::%d::%d u | Line 3827 plot [%.f:%.f] \"%s\" every :::%d::%d u |
| if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)"); | if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)"); |
| else fprintf(ficgp," \%%*lf (\%%*lf)"); | else fprintf(ficgp," \%%*lf (\%%*lf)"); |
| } | } |
| fprintf(ficgp,"\" t\"Period (stable) prevalence\" w l 0,\"%s\" every :::%d::%d u 1:($2+1.96*$3) \"\%%lf",subdirf2(fileres,"vpl"),k1-1,k1-1); | fprintf(ficgp,"\" t\"Period (stable) prevalence\" w l lt 1,\"%s\" every :::%d::%d u 1:($2+1.96*$3) \"\%%lf",subdirf2(fileres,"vpl"),k1-1,k1-1); |
| for (i=1; i<= nlstate ; i ++) { | for (i=1; i<= nlstate ; i ++) { |
| if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)"); | if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)"); |
| else fprintf(ficgp," \%%*lf (\%%*lf)"); | else fprintf(ficgp," \%%*lf (\%%*lf)"); |
| } | } |
| fprintf(ficgp,"\" t\"95\%% CI\" w l 1,\"%s\" every :::%d::%d u 1:($2-1.96*$3) \"\%%lf",subdirf2(fileres,"vpl"),k1-1,k1-1); | fprintf(ficgp,"\" t\"95\%% CI\" w l lt 2,\"%s\" every :::%d::%d u 1:($2-1.96*$3) \"\%%lf",subdirf2(fileres,"vpl"),k1-1,k1-1); |
| for (i=1; i<= nlstate ; i ++) { | for (i=1; i<= nlstate ; i ++) { |
| if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)"); | if (i==cpt) fprintf(ficgp," \%%lf (\%%lf)"); |
| else fprintf(ficgp," \%%*lf (\%%*lf)"); | else fprintf(ficgp," \%%*lf (\%%*lf)"); |
| } | } |
| fprintf(ficgp,"\" t\"\" w l 1,\"%s\" every :::%d::%d u 1:($%d) t\"Observed prevalence \" w l 2",subdirf2(fileres,"p"),k1-1,k1-1,2+4*(cpt-1)); | fprintf(ficgp,"\" t\"\" w l lt 2,\"%s\" every :::%d::%d u 1:($%d) t\"Observed prevalence \" w l lt 3",subdirf2(fileres,"p"),k1-1,k1-1,2+4*(cpt-1)); |
| } | } |
| } | } |
| /*2 eme*/ | /*2 eme*/ |
| Line 3855 plot [%.f:%.f] \"%s\" every :::%d::%d u | Line 3860 plot [%.f:%.f] \"%s\" every :::%d::%d u |
| if (j==i) fprintf(ficgp," \%%lf (\%%lf)"); | if (j==i) fprintf(ficgp," \%%lf (\%%lf)"); |
| else fprintf(ficgp," \%%*lf (\%%*lf)"); | else fprintf(ficgp," \%%*lf (\%%*lf)"); |
| } | } |
| fprintf(ficgp,"\" t\"\" w l 0,"); | fprintf(ficgp,"\" t\"\" w l lt 1,"); |
| fprintf(ficgp,"\"%s\" every :::%d::%d u 1:($2+$3*2) \"\%%lf",subdirf2(fileres,"t"),k1-1,k1-1); | fprintf(ficgp,"\"%s\" every :::%d::%d u 1:($2+$3*2) \"\%%lf",subdirf2(fileres,"t"),k1-1,k1-1); |
| for (j=1; j<= nlstate+1 ; j ++) { | for (j=1; j<= nlstate+1 ; j ++) { |
| if (j==i) fprintf(ficgp," \%%lf (\%%lf)"); | if (j==i) fprintf(ficgp," \%%lf (\%%lf)"); |
| else fprintf(ficgp," \%%*lf (\%%*lf)"); | else fprintf(ficgp," \%%*lf (\%%*lf)"); |
| } | } |
| if (i== (nlstate+1)) fprintf(ficgp,"\" t\"\" w l 0"); | if (i== (nlstate+1)) fprintf(ficgp,"\" t\"\" w l lt 1"); |
| else fprintf(ficgp,"\" t\"\" w l 0,"); | else fprintf(ficgp,"\" t\"\" w l lt 1,"); |
| } | } |
| } | } |
| Line 3949 plot [%.f:%.f] \"%s\" u ($1==%d ? ($3):1 | Line 3954 plot [%.f:%.f] \"%s\" u ($1==%d ? ($3):1 |
| fprintf(ficgp," exp(p%d+p%d*x",i,i+1); | fprintf(ficgp," exp(p%d+p%d*x",i,i+1); |
| ij=1;/* To be checked else nbcode[0][0] wrong */ | ij=1;/* To be checked else nbcode[0][0] wrong */ |
| for(j=3; j <=ncovmodel; j++) { | for(j=3; j <=ncovmodel; j++) { |
| if(((j-2)==Tage[ij]) &&(ij <=cptcovage)) { | if(((j-2)==Tage[ij]) &&(ij <=cptcovage)) { /* Bug valgrind */ |
| fprintf(ficgp,"+p%d*%d*x",i+j-1,nbcode[Tvar[j-2]][codtab[jk][Tvar[j-2]]]); | fprintf(ficgp,"+p%d*%d*x",i+j-1,nbcode[Tvar[j-2]][codtab[jk][Tvar[j-2]]]); |
| ij++; | ij++; |
| } | } |