version 1.188, 2015/04/30 08:27:53
|
version 1.190, 2015/05/05 08:51:13
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
Revision 1.190 2015/05/05 08:51:13 brouard |
|
Summary: Adding digits in output parameters (7 digits instead of 6) |
|
|
|
Fix 1+age+. |
|
|
|
Revision 1.189 2015/04/30 14:45:16 brouard |
|
Summary: 0.98q2 |
|
|
Revision 1.188 2015/04/30 08:27:53 brouard |
Revision 1.188 2015/04/30 08:27:53 brouard |
*** empty log message *** |
*** empty log message *** |
|
|
Line 681 typedef struct {
|
Line 689 typedef struct {
|
/* $Id$ */ |
/* $Id$ */ |
/* $State$ */ |
/* $State$ */ |
|
|
char version[]="Imach version 0.98q1, April 2015,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015"; |
char version[]="Imach version 0.98q2, April 2015,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015"; |
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 1566 void linmin(double p[], double xi[], int
|
Line 1574 void linmin(double p[], double xi[], int
|
printf("retour brent fret=%.12e xmin=%.12e\n",*fret,xmin); |
printf("retour brent fret=%.12e xmin=%.12e\n",*fret,xmin); |
fprintf(ficlog,"retour brent fret=%.12e xmin=%.12e\n",*fret,xmin); |
fprintf(ficlog,"retour brent fret=%.12e xmin=%.12e\n",*fret,xmin); |
#endif |
#endif |
printf("linmin end "); |
/* printf("linmin end "); */ |
for (j=1;j<=n;j++) { |
for (j=1;j<=n;j++) { |
/* printf(" before xi[%d]=%12.8f", j,xi[j]); */ |
/* printf(" before xi[%d]=%12.8f", j,xi[j]); */ |
xi[j] *= xmin; /* xi rescaled by xmin: if xmin=-1.237 and xi=(1,0,...,0) xi=(-1.237,0,...,0) */ |
xi[j] *= xmin; /* xi rescaled by xmin: if xmin=-1.237 and xi=(1,0,...,0) xi=(-1.237,0,...,0) */ |
if(xxs <1.0) |
/* if(xxs <1.0) */ |
printf(" after xi[%d]=%12.8f, xmin=%12.8f, ax=%12.8f, xx=%12.8f, bx=%12.8f, xxs=%12.8f", j,xi[j], xmin, ax, xx, bx,xxs ); |
/* printf(" after xi[%d]=%12.8f, xmin=%12.8f, ax=%12.8f, xx=%12.8f, bx=%12.8f, xxs=%12.8f", j,xi[j], xmin, ax, xx, bx,xxs ); */ |
p[j] += xi[j]; /* Parameters values are updated accordingly */ |
p[j] += xi[j]; /* Parameters values are updated accordingly */ |
} |
} |
printf("\n"); |
/* printf("\n"); */ |
printf("Comparing last *frec(xmin)=%12.8f from Brent and frec(0.)=%12.8f \n", (*func)(p)); |
/* printf("Comparing last *frec(xmin)=%12.8f from Brent and frec(0.)=%12.8f \n", *fret, (*func)(p)); */ |
free_vector(xicom,1,n); |
free_vector(xicom,1,n); |
free_vector(pcom,1,n); |
free_vector(pcom,1,n); |
} |
} |
Line 6395 int main(int argc, char *argv[])
|
Line 6403 int main(int argc, char *argv[])
|
fprintf(ficparo,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol,stepm,ncovcol,nlstate,ndeath,maxwav, mle, weightopt,model); |
fprintf(ficparo,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol,stepm,ncovcol,nlstate,ndeath,maxwav, mle, weightopt,model); |
fprintf(ficlog,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol,stepm,ncovcol,nlstate,ndeath,maxwav, mle, weightopt,model); |
fprintf(ficlog,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol,stepm,ncovcol,nlstate,ndeath,maxwav, mle, weightopt,model); |
fflush(ficlog); |
fflush(ficlog); |
if(model[0]=='#'|| model[0]== '\0'){ |
/* if(model[0]=='#'|| model[0]== '\0'){ */ |
|
if(model[0]=='#'){ |
printf("Error in 'model' line: model should start with 'model=1+age+' and end with '.' \n \ |
printf("Error in 'model' line: model should start with 'model=1+age+' and end with '.' \n \ |
'model=1+age+.' or 'model=1+age+V1.' or 'model=1+age+age*age+V1+V1*age.' or \n \ |
'model=1+age+.' or 'model=1+age+V1.' or 'model=1+age+age*age+V1+V1*age.' or \n \ |
'model=1+age+V1+V2.' or 'model=1+age+V1+V2+V1*V2.' etc. \n"); \ |
'model=1+age+V1+V2.' or 'model=1+age+V1+V2+V1*V2.' etc. \n"); \ |
Line 7106 Interval (in months) between two waves:
|
Line 7115 Interval (in months) between two waves:
|
fprintf(ficlog,"%d%d ",i,k); |
fprintf(ficlog,"%d%d ",i,k); |
fprintf(ficres,"%1d%1d ",i,k); |
fprintf(ficres,"%1d%1d ",i,k); |
for(j=1; j <=ncovmodel; j++){ |
for(j=1; j <=ncovmodel; j++){ |
printf("%lf ",p[jk]); |
printf("%12.7f ",p[jk]); |
fprintf(ficlog,"%lf ",p[jk]); |
fprintf(ficlog,"%12.7f ",p[jk]); |
fprintf(ficres,"%lf ",p[jk]); |
fprintf(ficres,"%12.7f ",p[jk]); |
jk++; |
jk++; |
} |
} |
printf("\n"); |
printf("\n"); |