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