|
|
| version 1.242, 2016/08/30 15:01:20 | version 1.244, 2016/09/02 07:17:34 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ | /* $Id$ |
| $State$ | $State$ |
| $Log$ | $Log$ |
| Revision 1.244 2016/09/02 07:17:34 brouard | |
| *** empty log message *** | |
| Revision 1.243 2016/09/02 06:45:35 brouard | |
| *** empty log message *** | |
| Revision 1.242 2016/08/30 15:01:20 brouard | Revision 1.242 2016/08/30 15:01:20 brouard |
| Summary: Fixing a lots | Summary: Fixing a lots |
| Line 2222 void powell(double p[], double **xi, int | Line 2228 void powell(double p[], double **xi, int |
| /* printf("\n"); */ | /* printf("\n"); */ |
| /* fprintf(ficlog,"\n"); */ | /* fprintf(ficlog,"\n"); */ |
| } | } |
| if (2.0*fabs(fp-(*fret)) <= ftol*(fabs(fp)+fabs(*fret))) { /* Did we reach enough precision? */ | /* if (2.0*fabs(fp-(*fret)) <= ftol*(fabs(fp)+fabs(*fret))) { /\* Did we reach enough precision? *\/ */ |
| if (2.0*fabs(fp-(*fret)) <= ftol) { /* Did we reach enough precision? */ | |
| /* We could compare with a chi^2. chisquare(0.95,ddl=1)=3.84 */ | /* We could compare with a chi^2. chisquare(0.95,ddl=1)=3.84 */ |
| /* By adding age*age in a model, the new -2LL should be lower and the difference follows a */ | /* By adding age*age in a model, the new -2LL should be lower and the difference follows a */ |
| /* a chisquare statistics with 1 degree. To be significant at the 95% level, it should have */ | /* a chisquare statistics with 1 degree. To be significant at the 95% level, it should have */ |
| Line 3213 double func( double *x) | Line 3220 double func( double *x) |
| Then computes with function pmij which return a matrix p[i][j] giving the elementary probability | Then computes with function pmij which return a matrix p[i][j] giving the elementary probability |
| to be observed in j being in i according to the model. | to be observed in j being in i according to the model. |
| */ | */ |
| ioffset=2+nagesqr+cptcovage; | ioffset=2+nagesqr ; |
| /* Fixed */ | /* Fixed */ |
| for (k=1; k<=ncovf;k++){ /* Simple and product fixed covariates without age* products */ | for (k=1; k<=ncovf;k++){ /* Simple and product fixed covariates without age* products */ |
| cov[ioffset+TvarFind[k]]=covar[Tvar[TvarFind[k]]][i];/* V5+V4+V3+V4*V3+V5*age+V2+V1*V2+V1*age+V1, only V1 is fixed (k=6)*/ | cov[ioffset+TvarFind[k]]=covar[Tvar[TvarFind[k]]][i];/* V5+V4+V3+V4*V3+V5*age+V2+V1*V2+V1*age+V1, only V1 is fixed (k=6)*/ |
| Line 3532 double funcone( double *x) | Line 3539 double funcone( double *x) |
| for(k=1; k<=nlstate; k++) ll[k]=0.; | for(k=1; k<=nlstate; k++) ll[k]=0.; |
| ioffset=0; | ioffset=0; |
| for (i=1,ipmx=0, sw=0.; i<=imx; i++){ | for (i=1,ipmx=0, sw=0.; i<=imx; i++){ |
| ioffset=2+nagesqr+cptcovage; | /* ioffset=2+nagesqr+cptcovage; */ |
| ioffset=2+nagesqr; | |
| /* Fixed */ | /* Fixed */ |
| /* for (k=1; k<=cptcovn;k++) cov[2+nagesqr+k]=covar[Tvar[k]][i]; */ | /* for (k=1; k<=cptcovn;k++) cov[2+nagesqr+k]=covar[Tvar[k]][i]; */ |
| /* for (k=1; k<=ncoveff;k++){ /\* Simple and product fixed Dummy covariates without age* products *\/ */ | /* for (k=1; k<=ncoveff;k++){ /\* Simple and product fixed Dummy covariates without age* products *\/ */ |
| Line 6521 void printinggnuplot(char fileresu[], ch | Line 6529 void printinggnuplot(char fileresu[], ch |
| else fprintf(ficgp,"\" t\"\" w l lt 0,\\\n"); | else fprintf(ficgp,"\" t\"\" w l lt 0,\\\n"); |
| } /* state */ | } /* state */ |
| } /* vpopbased */ | } /* vpopbased */ |
| fprintf(ficgp,"\nset out;set out \"%s_%d.svg\"; replot; set out; \n",subdirf2(optionfilefiname,"E_"),k1); /* Buggy gnuplot */ | fprintf(ficgp,"\nset out;set out \"%s_%d-%d.svg\"; replot; set out; \n",subdirf2(optionfilefiname,"E_"),k1,nres); /* Buggy gnuplot */ |
| } /* end nres */ | } /* end nres */ |
| } /* k1 end 2 eme*/ | } /* k1 end 2 eme*/ |