version 1.88, 2003/06/23 17:54:56
|
version 1.89, 2003/06/24 12:30:52
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
Revision 1.89 2003/06/24 12:30:52 brouard |
|
(Module): Some bugs corrected for windows. Also, when |
|
mle=-1 a template is output in file "or"mypar.txt with the design |
|
of the covariance matrix to be input. |
|
|
Revision 1.88 2003/06/23 17:54:56 brouard |
Revision 1.88 2003/06/23 17:54:56 brouard |
* imach.c (Repository): Create a sub-directory where all the secondary files are. Only imach, htm, gp and r(imach) are on the main directory. Correct time and other things. |
* imach.c (Repository): Create a sub-directory where all the secondary files are. Only imach, htm, gp and r(imach) are on the main directory. Correct time and other things. |
|
|
Line 320 static int split( char *path, char *dirc
|
Line 325 static int split( char *path, char *dirc
|
|
|
/******************************************/ |
/******************************************/ |
|
|
void replace(char *s, char*t) |
void replace_back_to_slash(char *s, char*t) |
{ |
{ |
int i; |
int i; |
int lg=20; |
int lg=0; |
i=0; |
i=0; |
lg=strlen(t); |
lg=strlen(t); |
for(i=0; i<= lg; i++) { |
for(i=0; i<= lg; i++) { |
Line 2627 void varevsij(char optionfilefiname[], d
|
Line 2632 void varevsij(char optionfilefiname[], d
|
/* 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); |
*/ |
*/ |
/* fprintf(ficgp,"\nset out \"varmuptjgr%s%s%s.png\";replot;",digitp,optionfilefiname,digit); */ |
/* fprintf(ficgp,"\nset out \"varmuptjgr%s%s%s.png\";replot;",digitp,optionfilefiname,digit); */ |
fprintf(ficgp,"\nset out \"%s%s.png\";replot;",digitp,subdirf3(optionfilefiname,"varmuptjgr",digitp),digit); |
fprintf(ficgp,"\nset out \"%s%s.png\";replot;\n",subdirf3(optionfilefiname,"varmuptjgr",digitp),digit); |
|
|
free_vector(xp,1,npar); |
free_vector(xp,1,npar); |
free_matrix(doldm,1,nlstate,1,nlstate); |
free_matrix(doldm,1,nlstate,1,nlstate); |
Line 3079 fprintf(fichtm," \n<ul><li><b>Graphs</b>
|
Line 3084 fprintf(fichtm," \n<ul><li><b>Graphs</b>
|
} |
} |
for(cpt=1; cpt<=nlstate;cpt++) { |
for(cpt=1; cpt<=nlstate;cpt++) { |
fprintf(fichtm,"\n<br>- Health life expectancies by age and initial health state (%d): %s%d%d.png <br> \ |
fprintf(fichtm,"\n<br>- Health life expectancies by age and initial health state (%d): %s%d%d.png <br> \ |
<img src=\"%s%d%d.png\">",cpt,subdirf2(optionfilefiname,"exo"),cpt,jj1,subdirf2(optionfilefiname,"exp"),cpt,jj1); |
<img src=\"%s%d%d.png\">",cpt,subdirf2(optionfilefiname,"exp"),cpt,jj1,subdirf2(optionfilefiname,"exp"),cpt,jj1); |
} |
} |
fprintf(fichtm,"\n<br>- Total life expectancy by age and \ |
fprintf(fichtm,"\n<br>- Total life expectancy by age and \ |
health expectancies in states (1) and (2): %s%d.png<br>\ |
health expectancies in states (1) and (2): %s%d.png<br>\ |
Line 3129 fprintf(fichtm," <ul><li><b>Graphs</b></
|
Line 3134 fprintf(fichtm," <ul><li><b>Graphs</b></
|
for(cpt=1; cpt<=nlstate;cpt++) { |
for(cpt=1; cpt<=nlstate;cpt++) { |
fprintf(fichtm,"<br>- Observed and period prevalence (with confident\ |
fprintf(fichtm,"<br>- Observed and period prevalence (with confident\ |
interval) in state (%d): %s%d%d.png <br>\ |
interval) in state (%d): %s%d%d.png <br>\ |
<img src=\"%s%d%d.png\">",cpt,subdirf2(optionfilefiname,"pe"),cpt,jj1,subdirf2(optionfilefiname,"pe"),cpt,jj1); |
<img src=\"%s%d%d.png\">",cpt,subdirf2(optionfilefiname,"vr"),cpt,jj1,subdirf2(optionfilefiname,"vr"),cpt,jj1); |
} |
} |
} /* end i1 */ |
} /* end i1 */ |
}/* End k1 */ |
}/* End k1 */ |
Line 3138 interval) in state (%d): %s%d%d.png <br>
|
Line 3143 interval) in state (%d): %s%d%d.png <br>
|
} |
} |
|
|
/******************* Gnuplot file **************/ |
/******************* Gnuplot file **************/ |
void printinggnuplot(char fileres[], char optionfilefiname[], double ageminpar, double agemaxpar, double fage , char path[], double p[]){ |
void printinggnuplot(char fileres[], char optionfilefiname[], double ageminpar, double agemaxpar, double fage , char pathc[], double p[]){ |
|
|
char dirfileres[132],optfileres[132]; |
char dirfileres[132],optfileres[132]; |
int m,cpt,k1,i,k,j,jk,k2,k3,ij,l; |
int m,cpt,k1,i,k,j,jk,k2,k3,ij,l; |
Line 3149 void printinggnuplot(char fileres[], cha
|
Line 3154 void printinggnuplot(char fileres[], cha
|
/* } */ |
/* } */ |
|
|
/*#ifdef windows */ |
/*#ifdef windows */ |
fprintf(ficgp,"cd \"%s\" \n",path); |
fprintf(ficgp,"cd \"%s\" \n",pathc); |
/*#endif */ |
/*#endif */ |
m=pow(2,cptcoveff); |
m=pow(2,cptcoveff); |
|
|
Line 3245 plot [%.f:%.f] \"%s\" every :::%d::%d u
|
Line 3250 plot [%.f:%.f] \"%s\" every :::%d::%d u
|
fprintf(ficgp,"\nset out \"%s%d%d.png\" \n",subdirf2(optionfilefiname,"p"),cpt,k1); |
fprintf(ficgp,"\nset out \"%s%d%d.png\" \n",subdirf2(optionfilefiname,"p"),cpt,k1); |
fprintf(ficgp,"set xlabel \"Age\" \nset ylabel \"Probability\" \n\ |
fprintf(ficgp,"set xlabel \"Age\" \nset ylabel \"Probability\" \n\ |
set ter png small\nset size 0.65,0.65\n\ |
set ter png small\nset size 0.65,0.65\n\ |
|
unset log y\n\ |
plot [%.f:%.f] \"%s\" u ($1==%d ? ($3):1/0):($%d/($%d",ageminpar,agemaxpar,subdirf2(fileres,"pij"),k1,k+cpt+1,k+1); |
plot [%.f:%.f] \"%s\" u ($1==%d ? ($3):1/0):($%d/($%d",ageminpar,agemaxpar,subdirf2(fileres,"pij"),k1,k+cpt+1,k+1); |
|
|
for (i=1; i< nlstate ; i ++) |
for (i=1; i< nlstate ; i ++) |
Line 4487 Title=%s <br>Datafile=%s Firstpass=%d La
|
Line 4493 Title=%s <br>Datafile=%s Firstpass=%d La
|
strcat(lfileres,"/"); |
strcat(lfileres,"/"); |
strcat(lfileres,optionfilefiname); |
strcat(lfileres,optionfilefiname); |
|
|
/* replace(pathc,path);*/ |
|
|
|
/* Calculates basic frequencies. Computes observed prevalence at single age |
/* Calculates basic frequencies. Computes observed prevalence at single age |
and prints on file fileres'p'. */ |
and prints on file fileres'p'. */ |
freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvaraff,nbcode, ncodemax,mint,anint); |
freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvaraff,nbcode, ncodemax,mint,anint); |
Line 4686 Interval (in months) between two waves:
|
Line 4690 Interval (in months) between two waves:
|
/* freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvaraff,nbcode, ncodemax,mint,anint);*/ |
/* freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvaraff,nbcode, ncodemax,mint,anint);*/ |
/*,dateprev1,dateprev2,jprev1, mprev1,anprev1,jprev2, mprev2,anprev2);*/ |
/*,dateprev1,dateprev2,jprev1, mprev1,anprev1,jprev2, mprev2,anprev2);*/ |
|
|
printinggnuplot(fileres, optionfilefiname,ageminpar,agemaxpar,fage, path,p); |
replace_back_to_slash(pathc,path); /* Even gnuplot wants a / */ |
|
printinggnuplot(fileres, optionfilefiname,ageminpar,agemaxpar,fage, pathc,p); |
|
|
printinghtml(fileres,title,datafile, firstpass, lastpass, stepm, weightopt,\ |
printinghtml(fileres,title,datafile, firstpass, lastpass, stepm, weightopt,\ |
model,imx,jmin,jmax,jmean,rfileres,popforecast,estepm,\ |
model,imx,jmin,jmax,jmean,rfileres,popforecast,estepm,\ |