--- imach/src/imach.c 2022/07/22 12:27:48 1.322
+++ imach/src/imach.c 2022/07/23 17:44:26 1.324
@@ -1,6 +1,12 @@
-/* $Id: imach.c,v 1.322 2022/07/22 12:27:48 brouard Exp $
+/* $Id: imach.c,v 1.324 2022/07/23 17:44:26 brouard Exp $
$State: Exp $
$Log: imach.c,v $
+ Revision 1.324 2022/07/23 17:44:26 brouard
+ *** empty log message ***
+
+ Revision 1.323 2022/07/22 12:30:08 brouard
+ * imach.c (Module): Output of Wald test in the htm file and not only in the log.
+
Revision 1.322 2022/07/22 12:27:48 brouard
* imach.c (Module): Output of Wald test in the htm file and not only in the log.
@@ -866,7 +872,7 @@
The same imach parameter file can be used but the option for mle should be -3.
- Agnès, who wrote this part of the code, tried to keep most of the
+ Agnès, who wrote this part of the code, tried to keep most of the
former routines in order to include the new code within the former code.
The output is very simple: only an estimate of the intercept and of
@@ -1045,13 +1051,13 @@ Important routines
- Tricode which tests the modality of dummy variables (in order to warn with wrong or empty modalities)
and returns the number of efficient covariates cptcoveff and modalities nbcode[Tvar[k]][1]= 0 and nbcode[Tvar[k]][2]= 1 usually.
- printinghtml which outputs results like life expectancy in and from a state for a combination of modalities of dummy variables
- o There are 2*cptcoveff combinations of (0,1) for cptcoveff variables. Outputting only combinations with people, éliminating 1 1 if
+ o There are 2*cptcoveff combinations of (0,1) for cptcoveff variables. Outputting only combinations with people, éliminating 1 1 if
race White (0 0), Black vs White (1 0), Hispanic (0 1) and 1 1 being meaningless.
- Authors: Nicolas Brouard (brouard@ined.fr) and Agnès Lièvre (lievre@ined.fr).
- Institut national d'études démographiques, Paris.
+ Authors: Nicolas Brouard (brouard@ined.fr) and Agnès Lièvre (lievre@ined.fr).
+ Institut national d'études démographiques, Paris.
This software have been partly granted by Euro-REVES, a concerted action
from the European Union.
It is copyrighted identically to a GNU software product, ie programme and
@@ -1206,12 +1212,12 @@ typedef struct {
#define ODIRSEPARATOR '\\'
#endif
-/* $Id: imach.c,v 1.322 2022/07/22 12:27:48 brouard Exp $ */
+/* $Id: imach.c,v 1.324 2022/07/23 17:44:26 brouard Exp $ */
/* $State: Exp $ */
#include "version.h"
char version[]=__IMACH_VERSION__;
-char copyright[]="May 2022,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2020, Nihon University 2021-202, INED 2000-2022";
-char fullversion[]="$Revision: 1.322 $ $Date: 2022/07/22 12:27:48 $";
+char copyright[]="July 2022,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2020, Nihon University 2021-202, INED 2000-2022";
+char fullversion[]="$Revision: 1.324 $ $Date: 2022/07/23 17:44:26 $";
char strstart[80];
char optionfilext[10], optionfilefiname[FILENAMELENGTH];
int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */
@@ -2413,16 +2419,16 @@ void powell(double p[], double **xi, int
for (j=1;j<=n;j++) pt[j]=p[j];
rcurr_time = time(NULL);
for (*iter=1;;++(*iter)) {
- fp=(*fret); /* From former iteration or initial value */
ibig=0;
del=0.0;
rlast_time=rcurr_time;
/* (void) gettimeofday(&curr_time,&tzp); */
rcurr_time = time(NULL);
curr_time = *localtime(&rcurr_time);
- printf("\nPowell iter=%d -2*LL=%.12f %ld sec. %ld sec.",*iter,*fret, rcurr_time-rlast_time, rcurr_time-rstart_time);fflush(stdout);
- fprintf(ficlog,"\nPowell iter=%d -2*LL=%.12f %ld sec. %ld sec.",*iter,*fret,rcurr_time-rlast_time, rcurr_time-rstart_time); fflush(ficlog);
+ printf("\nPowell iter=%d -2*LL=%.12f gain=%.12f=%.3g %ld sec. %ld sec.",*iter,*fret, fp-*fret,fp-*fret, rcurr_time-rlast_time, rcurr_time-rstart_time);fflush(stdout);
+ fprintf(ficlog,"\nPowell iter=%d -2*LL=%.12f gain=%.12f=%.3g %ld sec. %ld sec.",*iter,*fret, fp-*fret,fp-*fret,rcurr_time-rlast_time, rcurr_time-rstart_time); fflush(ficlog);
/* fprintf(ficrespow,"%d %.12f %ld",*iter,*fret,curr_time.tm_sec-start_time.tm_sec); */
+ fp=(*fret); /* From former iteration or initial value */
for (i=1;i<=n;i++) {
fprintf(ficrespow," %.12lf", p[i]);
}
@@ -7992,8 +7998,8 @@ set ter svg size 640, 480\nunset log y\n
fprintf(ficgp,", '' ");
/* l=(nlstate+ndeath)*(i-1)+1; */
l=(nlstate+ndeath)*(cpt-1)+1; /* fixed for i; cpt=1 1, cpt=2 1+ nlstate+ndeath, 1+2*(nlstate+ndeath) */
- /* fprintf(ficgp," u ($1==%d ? ($3):1/0):($%d/($%d",k1,k+l+(cpt-1),k+l); /\* a vérifier *\/ */
- /* fprintf(ficgp," u ($1==%d ? ($3):1/0):($%d/($%d",k1,k+l+(cpt-1),k+l+(cpt-1)+i-1); /\* a vérifier *\/ */
+ /* fprintf(ficgp," u ($1==%d ? ($3):1/0):($%d/($%d",k1,k+l+(cpt-1),k+l); /\* a vérifier *\/ */
+ /* fprintf(ficgp," u ($1==%d ? ($3):1/0):($%d/($%d",k1,k+l+(cpt-1),k+l+(cpt-1)+i-1); /\* a vérifier *\/ */
fprintf(ficgp," u ($1==%d ? ($3):1/0):($%d",k1,k+l+i-1); /* To be verified */
/* for (j=2; j<= nlstate ; j ++) */
/* fprintf(ficgp,"+$%d",k+l+j-1); */
@@ -12149,7 +12155,7 @@ Title=%s
Datafile=%s Firstpass=%d La
optionfilehtmcov,version,fullversion,title,datafile,firstpass,lastpass,stepm, weightopt, model);
}
- fprintf(fichtm,"