/* $Id$
$State$
$Log$
+ Revision 1.105 2006/01/05 20:23:19 lievre
+ *** empty log message ***
+
Revision 1.104 2005/09/30 16:11:43 lievre
(Module): sump fixed, loop imx fixed, and simplifications.
(Module): If the status is missing at the last wave but we know
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
/* #include <sys/time.h> */
/* $Id$ */
/* $State$ */
-char version[]="Imach version 0.98, September 2005, INED-EUROREVES ";
+char version[]="Imach version 0.98a, January 2006, INED-EUROREVES ";
char fullversion[]="$Revision$ $Date$";
int erreur, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */
int nvar;
}
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<li><h4> Computing probabilities of dying over estepm months as a weighted average (i.e global mortality independent of initial healh state)</h4></li>\n");
fprintf(fichtm,"\n<br>%s <br>\n",digitp);
/* } */
double jprev2, double mprev2,double anprev2){
int jj1, k1, i1, cpt;
- fprintf(fichtm,"<ul><li><h4>Result files (first order: no variance)</h4>\n \
+ fprintf(fichtm,"<ul><li><a> href="#firstorder">Result files (first order: no variance)</a>\n \
+ <li><a> href="#secondorder">Result files (second order (variance)</a>\n \
+</ul>");
+ fprintf(fichtm,"<ul><li><h4><a name="firstorder">Result files (first order: no variance)</a></h4>\n \
- Observed prevalence in each state (during the period defined between %.lf/%.lf/%.lf and %.lf/%.lf/%.lf): <a href=\"%s\">%s</a> <br>\n ",
jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,subdirf2(fileres,"p"),subdirf2(fileres,"p"));
fprintf(fichtm,"\
fprintf(fichtm,"\
-\n<br><li><h4> Result files (second order: variances)</h4>\n\
+\n<br><li><h4> <a name="secondorder">Result files (second order: variances)</a></h4>\n\
- Parameter file with estimated parameters and covariance matrix: <a href=\"%s\">%s</a> <br>\n", rfileres,rfileres);
fprintf(fichtm," - Variance of one-step probabilities: <a href=\"%s\">%s</a> <br>\n",
fprintf(fichtm,"<ul><li><h4>Life table</h4>\n <br>");
- fprintf(fichtm,"\nAge lx qx dx Lx Tx e(x)<br>");
+ fprintf(fichtm,"\nAge l<inf>x</inf> q<inf>x</inf> d(x,x+1) L<inf>x</inf> T<inf>x</inf> e<infx</inf><br>");
for (k=agegomp;k<(agemortsup-2);k++)
fprintf(fichtm,"%d %.0lf %lf %.0lf %.0lf %.0lf %lf<br>\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]);
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);