version 1.119, 2006/03/15 17:42:26
|
version 1.121, 2006/03/16 17:45:01
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
Revision 1.121 2006/03/16 17:45:01 lievre |
|
* imach.c (Module): Comments concerning covariates added |
|
|
|
* imach.c (Module): refinements in the computation of lli if |
|
status=-2 in order to have more reliable computation if stepm is |
|
not 1 month. Version 0.98f |
|
|
|
Revision 1.120 2006/03/16 15:10:38 lievre |
|
(Module): refinements in the computation of lli if |
|
status=-2 in order to have more reliable computation if stepm is |
|
not 1 month. Version 0.98f |
|
|
Revision 1.119 2006/03/15 17:42:26 brouard |
Revision 1.119 2006/03/15 17:42:26 brouard |
(Module): Bug if status = -2, the loglikelihood was |
(Module): Bug if status = -2, the loglikelihood was |
computed as likelihood omitting the logarithm. Version O.98e |
computed as likelihood omitting the logarithm. Version O.98e |
Line 329 extern int errno;
|
Line 341 extern int errno;
|
/* $Id$ */ |
/* $Id$ */ |
/* $State$ */ |
/* $State$ */ |
|
|
char version[]="Imach version 0.98e, March 2006, INED-EUROREVES-Institut de longevite "; |
char version[]="Imach version 0.98f, March 2006, INED-EUROREVES-Institut de longevite "; |
char fullversion[]="$Revision$ $Date$"; |
char fullversion[]="$Revision$ $Date$"; |
char strstart[80]; |
char strstart[80]; |
char optionfilext[10], optionfilefiname[FILENAMELENGTH]; |
char optionfilext[10], optionfilefiname[FILENAMELENGTH]; |
Line 1386 double func( double *x)
|
Line 1398 double func( double *x)
|
|
|
} else if (s2==-2) { |
} else if (s2==-2) { |
for (j=1,survp=0. ; j<=nlstate; j++) |
for (j=1,survp=0. ; j<=nlstate; j++) |
survp += out[s1][j]; |
survp += (1.+bbh)*out[s1][j]- bbh*savm[s1][j]; |
|
/*survp += out[s1][j]; */ |
lli= log(survp); |
lli= log(survp); |
} |
} |
|
|
/* else if (s2==-4) { */ |
else if (s2==-4) { |
/* for (j=3,survp=0. ; j<=nlstate; j++) */ |
for (j=3,survp=0. ; j<=nlstate; j++) |
/* survp += out[s1][j]; */ |
survp += (1.+bbh)*out[s1][j]- bbh*savm[s1][j]; |
/* lli= survp; */ |
lli= log(survp); |
/* } */ |
} |
|
|
/* else if (s2==-5) { */ |
|
/* for (j=1,survp=0. ; j<=2; j++) */ |
|
/* survp += out[s1][j]; */ |
|
/* lli= survp; */ |
|
/* } */ |
|
|
|
|
|
|
else if (s2==-5) { |
|
for (j=1,survp=0. ; j<=2; j++) |
|
survp += (1.+bbh)*out[s1][j]- bbh*savm[s1][j]; |
|
lli= log(survp); |
|
} |
|
|
else{ |
else{ |
lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */ |
lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */ |
/* lli= (savm[s1][s2]>(double)1.e-8 ?log((1.+bbh)*out[s1][s2]- bbh*(savm[s1][s2])):log((1.+bbh)*out[s1][s2]));*/ /* linear interpolation */ |
/* lli= (savm[s1][s2]>(double)1.e-8 ?log((1.+bbh)*out[s1][s2]- bbh*(savm[s1][s2])):log((1.+bbh)*out[s1][s2]));*/ /* linear interpolation */ |
Line 1599 double funcone( double *x)
|
Line 1611 double funcone( double *x)
|
lli=log(out[s1][s2] - savm[s1][s2]); |
lli=log(out[s1][s2] - savm[s1][s2]); |
} else if (s2==-2) { |
} else if (s2==-2) { |
for (j=1,survp=0. ; j<=nlstate; j++) |
for (j=1,survp=0. ; j<=nlstate; j++) |
survp += out[s1][j]; |
survp += (1.+bbh)*out[s1][j]- bbh*savm[s1][j]; |
lli= log(survp); |
lli= log(survp); |
}else if (mle==1){ |
}else if (mle==1){ |
lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */ |
lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */ |
Line 3448 void printinghtml(char fileres[], char t
|
Line 3460 void printinghtml(char fileres[], char t
|
- Period (stable) prevalence in each health state: <a href=\"%s\">%s</a> <br>\n", |
- Period (stable) prevalence in each health state: <a href=\"%s\">%s</a> <br>\n", |
subdirf2(fileres,"pl"),subdirf2(fileres,"pl")); |
subdirf2(fileres,"pl"),subdirf2(fileres,"pl")); |
fprintf(fichtm,"\ |
fprintf(fichtm,"\ |
- (a) Life expectancies by health status at initial age, (b) health expectancies by health status at initial age: ei., eij (estepm=%2d months): \ |
- (a) Life expectancies by health status at initial age, (b) health expectancies by health status at initial age: ei., eij . If one or more covariate are included, specific tables for each value of the covariate are output in sequences within the same file (estepm=%2d months): \ |
<a href=\"%s\">%s</a> <br>\n</li>", |
<a href=\"%s\">%s</a> <br>\n</li>", |
estepm,subdirf2(fileres,"e"),subdirf2(fileres,"e")); |
estepm,subdirf2(fileres,"e"),subdirf2(fileres,"e")); |
|
|