--- imach/src/imach.c 2006/01/25 00:51:50 1.110 +++ imach/src/imach.c 2006/03/06 10:29:27 1.116 @@ -1,6 +1,30 @@ -/* $Id: imach.c,v 1.110 2006/01/25 00:51:50 brouard Exp $ +/* $Id: imach.c,v 1.116 2006/03/06 10:29:27 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.116 2006/03/06 10:29:27 brouard + (Module): Variance-covariance wrong links and + varian-covariance of ej. is needed (Saito). + + Revision 1.115 2006/02/27 12:17:45 brouard + (Module): One freematrix added in mlikeli! 0.98c + + Revision 1.114 2006/02/26 12:57:58 brouard + (Module): Some improvements in processing parameter + filename with strsep. + + Revision 1.113 2006/02/24 14:20:24 brouard + (Module): Memory leaks checks with valgrind and: + datafile was not closed, some imatrix were not freed and on matrix + allocation too. + + Revision 1.112 2006/01/30 09:55:26 brouard + (Module): Back to gnuplot.exe instead of wgnuplot.exe + + Revision 1.111 2006/01/25 20:38:18 brouard + (Module): Lots of cleaning and bugs added (Gompertz) + (Module): Comments can be added in data file. Missing date values + can be a simple dot '.'. + Revision 1.110 2006/01/25 00:51:50 brouard (Module): Lots of cleaning and bugs added (Gompertz) @@ -284,11 +308,11 @@ extern int errno; #define ODIRSEPARATOR '/' #endif -/* $Id: imach.c,v 1.110 2006/01/25 00:51:50 brouard Exp $ */ +/* $Id: imach.c,v 1.116 2006/03/06 10:29:27 brouard Exp $ */ /* $State: Exp $ */ -char version[]="Imach version 0.98a, January 2006, INED-EUROREVES "; -char fullversion[]="$Revision: 1.110 $ $Date: 2006/01/25 00:51:50 $"; +char version[]="Imach version 0.98c, February 2006, INED-EUROREVES "; +char fullversion[]="$Revision: 1.116 $ $Date: 2006/03/06 10:29:27 $"; int erreur, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ int nvar; int cptcovn=0, cptcovage=0, cptcoveff=0,cptcov; @@ -332,7 +356,7 @@ FILE *ficresvpl; char fileresvpl[FILENAMELENGTH]; char title[MAXLINE]; char optionfile[FILENAMELENGTH], datafile[FILENAMELENGTH], filerespl[FILENAMELENGTH]; -char optionfilext[10], optionfilefiname[FILENAMELENGTH], plotcmd[FILENAMELENGTH]; +char optionfilext[10], optionfilefiname[FILENAMELENGTH], plotcmd[FILENAMELENGTH], pplotcmd[FILENAMELENGTH]; char tmpout[FILENAMELENGTH], tmpout2[FILENAMELENGTH]; char command[FILENAMELENGTH]; int outcmd=0; @@ -1651,6 +1675,7 @@ void mlikeli(FILE *ficres,double p[], in powell(p,xi,npar,ftol,&iter,&fret,func); + free_matrix(xi,1,npar,1,npar); fclose(ficrespow); printf("\n#Number of iterations = %d, -2 Log likelihood = %.12f\n",iter,func(p)); fprintf(ficlog,"\n#Number of iterations = %d, -2 Log likelihood = %.12f \n",iter,func(p)); @@ -2205,11 +2230,11 @@ void concatwav(int wav[], int **dh, int if(mi==0){ nbwarn++; if(first==0){ - printf("Warning! None valid information for:%ld line=%d (skipped) and may be others, see log file\n",num[i],i); + printf("Warning! No valid information for individual %ld line=%d (skipped) and may be others, see log file\n",num[i],i); first=1; } if(first==1){ - fprintf(ficlog,"Warning! None valid information for:%ld line=%d (skipped)\n",num[i],i); + fprintf(ficlog,"Warning! No valid information for individual %ld line=%d (skipped)\n",num[i],i); } } /* end mi==0 */ } /* End individuals */ @@ -3226,6 +3251,8 @@ To be simple, these graphs help to under } free_ma3x(varpij,1,nlstate,1,nlstate+ndeath,(int) bage, (int)fage); free_matrix(mu,1,(nlstate+ndeath)*(nlstate+ndeath),(int) bage, (int)fage); + free_matrix(doldm,1,(nlstate)*(nlstate+ndeath),1,(nlstate)*(nlstate+ndeath)); + free_matrix(dnewm,1,(nlstate)*(nlstate+ndeath),1,npar); free_vector(xp,1,npar); fclose(ficresprob); fclose(ficresprobcov); @@ -3257,9 +3284,18 @@ void printinghtml(char fileres[], char t - Stable prevalence in each health state: %s
\n", subdirf2(fileres,"pl"),subdirf2(fileres,"pl")); fprintf(fichtm,"\ - - Life expectancies by age and initial health status (estepm=%2d months): \ + - Life expectancies by age and initial health status (estepm=%2d months) WRONG LINK (to be made): \ + %s
\n", + estepm,subdirf2(fileres,"le"),subdirf2(fileres,"le")); + fprintf(fichtm,"\ + - Health expectancies by age and initial health status with standard errors (estepm=%2d months): \ %s
\n", estepm,subdirf2(fileres,"e"),subdirf2(fileres,"e")); + fprintf(fichtm,"\ + - Variances and covariances of health expectancies by age and initial health status (estepm=%2d months) TO BE MADE: \ + %s
\n", + estepm,subdirf2(fileres,"vch"),subdirf2(fileres,"vch")); + fprintf(fichtm," \n