--- imach096d/src/imach.c 2002/07/19 12:22:25 1.51
+++ imach096d/src/imach.c 2002/07/19 18:49:30 1.52
@@ -1,4 +1,4 @@
-/* $Id: imach.c,v 1.51 2002/07/19 12:22:25 brouard Exp $
+/* $Id: imach.c,v 1.52 2002/07/19 18:49:30 brouard Exp $
Interpolated Markov Chain
Short summary of the programme:
@@ -1862,7 +1862,7 @@ void varevsij(char optionfilefiname[], d
exit(0);
}
else{
- fprintf(fichtm,"\n
Computing step probabilities of dying and weighted average (i.e global mortality independent of initial healh state)
\n");
+ fprintf(fichtm,"\n Computing probabilities of dying as a weighted average (i.e global mortality independent of initial healh state)
\n");
}
varppt = matrix(nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath);
@@ -2013,7 +2013,7 @@ void varevsij(char optionfilefiname[], d
/* This for computing force of mortality (h=1)as a weighted average */
for(j=nlstate+1,gmp[j]=0.;j<=nlstate+ndeath;j++){
for(i=1; i<= nlstate; i++)
- gmp[j] += prlim[i][i]*p3mat[i][j][1];
+ gmp[j] += prlim[i][i]*p3mat[i][j][1];
}
/* end force of mortality */
@@ -2049,7 +2049,9 @@ void varevsij(char optionfilefiname[], d
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(fichtm,"\n
File (multiple files are possible if covariates are present): %s\n",fileresprobmorprev,fileresprobmorprev);
- fprintf(fichtm,"\n
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
\n", stepm,YEARM,digitp,digit);
+ fprintf(fichtm,"\n
Probability is computed over estepm=%d months.
\n", stepm,digitp,digit);
+ /* fprintf(fichtm,"\n
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
\n", stepm,YEARM,digitp,digit);
+*/
fprintf(ficgp,"\nset out \"varmuptjgr%s%s.png\";replot;",digitp,digit);
free_vector(xp,1,npar);
@@ -2420,6 +2422,7 @@ void varprob(char optionfilefiname[], do
fprintf(ficgp,"\nset ter png small\nset size 0.65,0.65");
fprintf(fichtm,"\n
Ellipsoids of confidence cov(p%1d%1d,p%1d%1d) expressed in year-1 :varpijgr%s%d%1d%1d-%1d%1d.png, ",k1,l1,k2,l2,optionfilefiname, j1,k1,l1,k2,l2,optionfilefiname, j1,k1,l1,k2,l2);
fprintf(fichtm,"\n
",optionfilefiname, j1,k1,l1,k2,l2);
+ fprintf(fichtm,"\n
Correlation at age %d (%.3f),",(int) age, c12);
fprintf(ficgp,"\nset out \"varpijgr%s%d%1d%1d-%1d%1d.png\"",optionfilefiname, j1,k1,l1,k2,l2);
fprintf(ficgp,"\nset label \"%d\" at %11.3e,%11.3e center",(int) age, mu1,mu2);
fprintf(ficgp,"\n# Age %d, p%1d%1d - p%1d%1d",(int) age, k1,l1,k2,l2);
@@ -2428,6 +2431,7 @@ void varprob(char optionfilefiname[], do
mu2,std,v21,sqrt(lc1),v22,sqrt(lc2));
}else{
first=0;
+ fprintf(fichtm," %d (%.3f),",(int) age, c12);
fprintf(ficgp,"\n# Age %d, p%1d%1d - p%1d%1d",(int) age, k1,l1,k2,l2);
fprintf(ficgp,"\nset label \"%d\" at %11.3e,%11.3e center",(int) age, mu1,mu2);
fprintf(ficgp,"\nreplot %11.3e+ %.3f*(%11.3e*%11.3e*cos(t)+%11.3e*%11.3e*sin(t)), %11.3e +%.3f*(%11.3e*%11.3e*cos(t)+%11.3e*%11.3e*sin(t)) not",\