From: N. Brouard Date: Mon, 20 May 2019 13:03:18 +0000 (+0000) Subject: Summary: Projection syntax simplified X-Git-Tag: imach-099s7~185 X-Git-Url: https://henry.ined.fr/git/?a=commitdiff_plain;h=87a302af66c52a28efff6ba4ffc8341ee63b24d2;p=.git Summary: Projection syntax simplified We can now start projections, forward or backward, from the mean date of inteviews up to or down to a number of years of projection: prevforecast=1 yearsfproj=15.3 mobil_average=0 or prevforecast=1 starting-proj-date=1/1/2007 final-proj-date=12/31/2017 mobil_average=0 or prevbackcast=1 yearsbproj=12.3 mobil_average=1 or prevbackcast=1 starting-back-date=1/10/1999 final-back-date=1/1/1985 mobil_average=1 --- diff --git a/src/imach.c b/src/imach.c index 3cd86c8..5538037 100644 --- a/src/imach.c +++ b/src/imach.c @@ -1,6 +1,9 @@ /* $Id$ $State$ $Log$ + Revision 1.295 2019/05/18 09:52:50 brouard + Summary: doxygen tex bug + Revision 1.294 2019/05/16 14:54:33 brouard Summary: There was some wrong lines added @@ -1259,7 +1262,12 @@ double **pmmij, ***probs; /* Global pointer */ double ***mobaverage, ***mobaverages; /* New global variable */ double *ageexmed,*agecens; double dateintmean=0; + double anprojd, mprojd, jprojd; /* For eventual projections */ + double anprojf, mprojf, jprojf; + double anbackd, mbackd, jbackd; /* For eventual backprojections */ + double anbackf, mbackf, jbackf; + double jintmean,mintmean,aintmean; double *weight; int **s; /* Status */ double *agedc; @@ -3140,7 +3148,7 @@ double **bpmij(double **ps, double *cov, int ncovmodel, double *x, int nlstate ) ps[ii][ii]=1; } } - /* Added for backcast */ /* Transposed matrix too */ + /* Added for prevbcast */ /* Transposed matrix too */ for(jj=1; jj<= nlstate+ndeath; jj++){ s1=0.; for(ii=1; ii<= nlstate+ndeath; ii++){ @@ -4973,6 +4981,7 @@ Title=%s
Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=1+age } } /* end mle=-2 */ dateintmean=dateintsum/k2cpt; + date2dmy(dateintmean,&jintmean,&mintmean,&aintmean); fclose(ficresp); fclose(ficresphtm); @@ -6808,9 +6817,9 @@ To be simple, these graphs help to understand the significativity of each parame void printinghtml(char fileresu[], char title[], char datafile[], int firstpass, \ int lastpass, int stepm, int weightopt, char model[],\ int imx,int jmin, int jmax, double jmeanint,char rfileres[],\ - int popforecast, int mobilav, int prevfcast, int mobilavproj, int backcast, int estepm , \ - double jprev1, double mprev1,double anprev1, double dateprev1, double dateproj1, double dateback1, \ - double jprev2, double mprev2,double anprev2, double dateprev2, double dateproj2, double dateback2){ + int popforecast, int mobilav, int prevfcast, int mobilavproj, int prevbcast, int estepm , \ + double jprev1, double mprev1,double anprev1, double dateprev1, double dateprojd, double dateback1, \ + double jprev2, double mprev2,double anprev2, double dateprev2, double dateprojf, double dateback2){ int jj1, k1, i1, cpt, k4, nres; fprintf(fichtm,"