--- imach/src/imach.c 2009/07/06 08:22:05 1.132 +++ imach/src/imach.c 2009/07/06 10:21:25 1.133 @@ -1,6 +1,9 @@ -/* $Id: imach.c,v 1.132 2009/07/06 08:22:05 brouard Exp $ +/* $Id: imach.c,v 1.133 2009/07/06 10:21:25 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.133 2009/07/06 10:21:25 brouard + just nforces + Revision 1.132 2009/07/06 08:22:05 brouard Many tings @@ -171,7 +174,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 @@ -304,8 +307,8 @@ Also this programme outputs the covariance matrix of the parameters but also of the life expectancies. It also computes the period (stable) prevalence. - 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 @@ -400,15 +403,15 @@ extern int errno; #define ODIRSEPARATOR '/' #endif -/* $Id: imach.c,v 1.132 2009/07/06 08:22:05 brouard Exp $ */ +/* $Id: imach.c,v 1.133 2009/07/06 10:21:25 brouard Exp $ */ /* $State: Exp $ */ -char version[]="Imach version 0.98k, June 2006, INED-EUROREVES-Institut de longevite "; -char fullversion[]="$Revision: 1.132 $ $Date: 2009/07/06 08:22:05 $"; +char version[]="Imach version 0.98k, June 2009, INED-EUROREVES-Institut de longevite "; +char fullversion[]="$Revision: 1.133 $ $Date: 2009/07/06 10:21:25 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ -int nvar=0; +int nvar=0, nforce=0; /* Number of variables, number of forces */ int cptcovn=0, cptcovage=0, cptcoveff=0,cptcov=0; /* Number of covariates, of covariates with '*age' */ int npar=NPARMAX; int nlstate=2; /* Number of live states */ @@ -4660,8 +4663,8 @@ int main(int argc, char *argv[]) /* where is ncovprod ?*/ ncovmodel=2+cptcovn; /*Number of variables = cptcovn + intercept + age : v1+v2+v3+v2*v4+v5*age makes 5+2=7*/ nvar=ncovmodel-1; /* Suppressing age as a basic covariate */ - nforces= (nlstate+ndeath-1)*nlstate; /* Number of forces ij from state i to j */ - npar= (nlstate+ndeath-1)*nlstate*ncovmodel; /* Number of parameters like aij*/ + nforce= (nlstate+ndeath-1)*nlstate; /* Number of forces ij from state i to j */ + npar= nforce*ncovmodel; /* Number of parameters like aij*/ if(npar >MAXPARM || nlstate >NLSTATEMAX || ndeath >NDEATHMAX || ncovmodel>NCOVMAX){ printf("Too complex model for current IMaCh: npar=(nlstate+ndeath-1)*nlstate*ncovmodel=%d >= %d(MAXPARM) or nlstate=%d >= %d(NLSTATEMAX) or ndeath=%d >= %d(NDEATHMAX) or ncovmodel=(k+age+#of+signs)=%d(NCOVMAX) >= %d\n",npar, MAXPARM, nlstate, NLSTATEMAX, ndeath, NDEATHMAX, ncovmodel, NCOVMAX); fprintf(ficlog,"Too complex model for current IMaCh: %d >=%d(MAXPARM) or %d >=%d(NLSTATEMAX) or %d >=%d(NDEATHMAX) or %d(NCOVMAX) >=%d\n",npar, MAXPARM, nlstate, NLSTATEMAX, ndeath, NDEATHMAX, ncovmodel, NCOVMAX);