/* $Id$
$State$
$Log$
+ Revision 1.363 2024/06/28 09:31:55 brouard
+ Summary: Adding log lines too
+
Revision 1.362 2024/06/28 08:00:31 brouard
Summary: 0.99s6
- 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, eliminating 1 1 if
race White (0 0), Black vs White (1 0), Hispanic (0 1) and 1 1 being meaningless.
/* printf("%10d %10d%14.7g",nl, nf, fx); */
/* printf ( "\n" ); */
printf ( " Linear searches %d", nl );
+ fprintf (ficlog, " Linear searches %d", nl );
/* printf ( " Linear searches %d\n", nl ); */
/* printf ( " Function evaluations %d\n", nf ); */
/* printf ( " Function value FX = %g\n", fx ); */
{
/* for(i=1;i<=n;i++)printf("%14.7g",x[i-1]); */
for(i=1;i<=n;i++){
- printf("%14.7g",x[i]);
- fprintf(ficlog,"%14.7g",x[i]);
+ printf(" %14.7g",x[i]);
+ fprintf(ficlog," %14.7g",x[i]);
}
/* r8vec_print ( n, x, " X:" ); */
}
#else /* FLATSUP */
/* powell(p,xi,npar,ftol,&iter,&fret,func);*/
/* praxis ( t0, h0, n, prin, x, beale_f ); */
- /* int prin=1; */
+ int prin=4;
/* double h0=0.25; */
/* double macheps; */
/* double fmin; */
/* vlv= nbcode[Tvaraff[k]][lv]; /\* Value of the modality of Tvaraff[k] *\/ */
/* vlv= nbcode[Tvaraff[k]][codtabm(k1,TnsdVar[Tvaraff[k]])]; */
kl++;
+ /* Problem with quantitative variables TinvDoQresult[nres] */
/* sprintf(gplotcondition+strlen(gplotcondition),"$%d==%d && $%d==%d " ,kl,Tvaraff[k], kl+1, nbcode[Tvaraff[k]][lv]); */
- sprintf(gplotcondition+strlen(gplotcondition),"$%d==%d && $%d==%d " ,kl,lv, kl+1, vlv );
+ sprintf(gplotcondition+strlen(gplotcondition),"$%d==%d && $%d==%lg " ,kl,lv, kl+1, vlv );/* Solved but quantitative must be shifted */
kl++;
if(k <cptcovs && cptcovs>1)
sprintf(gplotcondition+strlen(gplotcondition)," && ");
fprintf(ficgp,"%s ? $%d/(1.-$%d) : 1/0):%d t 'p.%d' with line lc variable", gplotcondition, \
ioffset+(cpt-1)*(nlstate+1)+1+(i-1), ioffset+1+(i-1)+(nlstate+1)*nlstate,iyearc, cpt );
fprintf(ficgp,",\\\n '' ");
- fprintf(ficgp," u %d:(",iagec);
+ fprintf(ficgp," u %d:(",iagec); /* Below iyearc should be increades if quantitative variable in the reult line */
+ /* $7==6 && $8==2.47 ) && (($9-$10) == 1953 ) ? $12/(1.-$24) : 1/0):7 with labels center not */
+ /* but was && $7==6 && $8==2 ) && (($7-$8) == 1953 ) ? $12/(1.-$24) : 1/0):7 with labels center not */
fprintf(ficgp,"%s && (($%d-$%d) == %d ) ? $%d/(1.-$%d) : 1/0):%d with labels center not ", gplotcondition, \
iyearc, iagec, offyear, \
ioffset+(cpt-1)*(nlstate+1)+1+(i-1), ioffset+1+(i-1)+(nlstate+1)*nlstate, iyearc );
#else
free_ivector(flatdir,1,npar);
#endif /* LINMINORIGINAL*/
-
+#endif /* POWELL */
hesscov(matcov, hess, p, NDIM, delti, 1e-4, gompertz);
for(i=1; i <=NDIM; i++)