]> henry.ined.fr Git - .git/commitdiff
Some cleaning in esij and nhstepm
authorN. Brouard <brouard@ined.fr>
Tue, 12 Mar 2002 22:13:38 +0000 (22:13 +0000)
committerN. Brouard <brouard@ined.fr>
Tue, 12 Mar 2002 22:13:38 +0000 (22:13 +0000)
src/imach.c

index 363eb9610d3e29bbffb98618c81ab4d94ece6756..ab994a39eca10489522292bc388a6b37eff631b9 100644 (file)
@@ -1559,7 +1559,7 @@ void evsij(char fileres[], double ***eij, double x[], int nlstate, int stepm, in
     /* nhstepm age range expressed in number of stepm */\r
     nstepm=(int) rint((agelim-age)*YEARM/stepm); \r
     /* Typically if 20 years nstepm = 20*12/6=40 stepm */ \r
-    if (stepm >= YEARM) hstepm=1;\r
+    /* if (stepm >= YEARM) hstepm=1;*/\r
     nhstepm = nstepm/hstepm;/* Expressed in hstepm, typically nhstepm=40/4=10 */\r
     p3mat=ma3x(1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm);\r
     /* Computed by stepm unit matrices, product of hstepm matrices, stored\r
@@ -1903,7 +1903,7 @@ void printinghtml(char fileres[], char title[], char datafile[], int firstpass,
     printf("Problem with %s \n",optionfilehtm), exit(0);\r
   }\r
 \r
- fprintf(fichtm,"<body><ul> <font size=\"6\">Imach, Version 0.71c </font> <hr size=\"2\" color=\"#EC5E5E\"> \r
+ fprintf(fichtm,"<body><ul> <font size=\"6\">Imach, Version 0.71e </font> <hr size=\"2\" color=\"#EC5E5E\"> \r
 Title=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>\r
 \r
 Total number of observations=%d <br>\r
@@ -2466,7 +2466,7 @@ int main(int argc, char *argv[])
   double dateprev1, dateprev2,jproj1,mproj1,anproj1,jproj2,mproj2,anproj2;\r
   \r
 \r
-  char version[80]="Imach version 0.71c, March 2002, INED-EUROREVES ";\r
+  char version[80]="Imach version 0.71e, March 2002, INED-EUROREVES ";\r
   char *alph[]={"a","a","b","c","d","e"}, str[4];\r
 \r
 \r
@@ -3243,8 +3243,6 @@ while((c=getc(ficpar))=='#' && c!= EOF){
       for (i=1;i<=nlstate;i++) fprintf(ficrest,"e.%d (std) ",i);\r
       fprintf(ficrest,"\n");\r
 \r
-      hf=1;\r
-      if (stepm >= YEARM) hf=stepm/YEARM;\r
       epj=vector(1,nlstate+1);\r
       for(age=bage; age <=fage ;age++){\r
        prevalim(prlim, nlstate, p, age, oldm, savm,ftolpl,k);\r
@@ -3253,19 +3251,19 @@ while((c=getc(ficpar))=='#' && c!= EOF){
            prlim[i][i]=probs[(int)age][i][k];\r
        }\r
        \r
-       fprintf(ficrest," %.0f",age);\r
+       fprintf(ficrest," %4.0f",age);\r
        for(j=1, epj[nlstate+1]=0.;j <=nlstate;j++){\r
          for(i=1, epj[j]=0.;i <=nlstate;i++) {\r
-           epj[j] += prlim[i][i]*hf*eij[i][j][(int)age];\r
+           epj[j] += prlim[i][i]*eij[i][j][(int)age];\r
          }\r
          epj[nlstate+1] +=epj[j];\r
        }\r
        for(i=1, vepp=0.;i <=nlstate;i++)\r
          for(j=1;j <=nlstate;j++)\r
            vepp += vareij[i][j][(int)age];\r
-       fprintf(ficrest," %.2f (%.2f)", epj[nlstate+1],hf*sqrt(vepp));\r
+       fprintf(ficrest," %7.2f (%7.2f)", epj[nlstate+1],sqrt(vepp));\r
        for(j=1;j <=nlstate;j++){\r
-         fprintf(ficrest," %.2f (%.2f)", epj[j],hf*sqrt(vareij[j][j][(int)age]));\r
+         fprintf(ficrest," %7.2f (%7.2f)", epj[j],sqrt(vareij[j][j][(int)age]));\r
        }\r
        fprintf(ficrest,"\n");\r
       }\r