When agemin and agemax are not englobing extreme ages of persons in
the sample, there was an error, but not fully documented. These
extreme ages are often errors in the data (which are now
revealed). But if not, you can enlarge the range agemin:agemax.
CMAKE_MINIMUM_REQUIRED(VERSION 3.13..3.26.3)
set(PACKAGE_NAME "imach")
SET(IMACH_VERSION_MAJOR 0)
CMAKE_MINIMUM_REQUIRED(VERSION 3.13..3.26.3)
set(PACKAGE_NAME "imach")
SET(IMACH_VERSION_MAJOR 0)
-SET(IMACH_VERSION_MINOR 99s12)
+SET(IMACH_VERSION_MINOR 99s13)
SET(IMACH_VERSION_PATCH 0)
SET(IMACH_VERSION_NOTE "")
SET(IMACH_VERSION ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR})
SET(IMACH_VERSION_PATCH 0)
SET(IMACH_VERSION_NOTE "")
SET(IMACH_VERSION ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR})
#include <float.h> /* for DBL_EPSILON */
/* #include "machine.h" */
#include <float.h> /* for DBL_EPSILON */
/* #include "machine.h" */
/* extern void minfit(int n, double eps, double tol, double **ab, double q[]); */
/* extern void minfit(int n, double eps, double tol, double ab[N][N], double q[]); */
/* control parameters */
/* extern void minfit(int n, double eps, double tol, double **ab, double q[]); */
/* extern void minfit(int n, double eps, double tol, double ab[N][N], double q[]); */
/* control parameters */
if (l == k)
goto Convergence;
/* shift from bottom 2x2 minor */
if (l == k)
goto Convergence;
/* shift from bottom 2x2 minor */
- /* x = q[l]; y = q[k-l]; g = e[k-1]; h = e[k]; */ /* Error */
+ /* x = q[l]; y = q[k-l]; g = e[k-1]; h = e[k]; */ /* Gegenfurtner Error */
x = q[l]; y = q[k-1]; g = e[k-1]; h = e[k];
f = ((y-z)*(y+z) + (g-h)*(g+h)) / (2.0*h*y);
g = sqrt(f*f+1.0);
x = q[l]; y = q[k-1]; g = e[k-1]; h = e[k];
f = ((y-z)*(y+z) + (g-h)*(g+h)) / (2.0*h*y);
g = sqrt(f*f+1.0);
+ int biter=0; /* added */
double r;
double randbrent( int (*));
double s, sf;
double r;
double randbrent( int (*));
double s, sf;
+ /* Transposing v before golub */
/* for (j=0; j<=i-1; j++) { */
/* for (j=1; j<=i; j++) { */
for (j=1; j<=i-1; j++) {
/* for (j=0; j<=i-1; j++) { */
/* for (j=1; j<=i; j++) { */
for (j=1; j<=i-1; j++) {
}
/* for (i=0; i<n; i++) { */
double dni; /* added for compatibility with buckhardt but not brent */
}
/* for (i=0; i<n; i++) { */
double dni; /* added for compatibility with buckhardt but not brent */
+ /* Q^TVR=Sigma, v is v^t and d is sigma: Computing Sigma^{-2} as Q^TAQ= Sigma^{-2} */
for (i=1; i<=n; i++) {
dni=dn*d[i]; /* added for compatibility with buckhardt but not brent */
if ((dn * d[i]) > large)
for (i=1; i<=n; i++) {
dni=dn*d[i]; /* added for compatibility with buckhardt but not brent */
if ((dn * d[i]) > large)
printf("Prevalence combination of varying and fixed dummies %d\n",j1);
/* fprintf(ficlog," V%d=%d ",Tvaraff[j1],nbcode[Tvaraff[j1]][codtabm(k,j1)]); */
fprintf(ficlog,"Prevalence combination of varying and fixed dummies %d\n",j1);
printf("Prevalence combination of varying and fixed dummies %d\n",j1);
/* fprintf(ficlog," V%d=%d ",Tvaraff[j1],nbcode[Tvaraff[j1]][codtabm(k,j1)]); */
fprintf(ficlog,"Prevalence combination of varying and fixed dummies %d\n",j1);
+ int ierroragemin=0;int ierroragemax=0;
for (i=1; i<=imx; i++) { /* Each individual */
bool=1;
/* for(m=firstpass; m<=lastpass; m++){/\* Other selection (we can limit to certain interviews*\/ */
for (i=1; i<=imx; i++) { /* Each individual */
bool=1;
/* for(m=firstpass; m<=lastpass; m++){/\* Other selection (we can limit to certain interviews*\/ */
if ((y2>=dateprev1) && (y2<=dateprev2)) { /* Here is the main selection (fractional years) */
if(agev[m][i]==0) agev[m][i]=iagemax+1;
if(agev[m][i]==1) agev[m][i]=iagemax+2;
if ((y2>=dateprev1) && (y2<=dateprev2)) { /* Here is the main selection (fractional years) */
if(agev[m][i]==0) agev[m][i]=iagemax+1;
if(agev[m][i]==1) agev[m][i]=iagemax+2;
- if((int)agev[m][i] <iagemin-AGEMARGE || (int)agev[m][i] >iagemax+4+AGEMARGE){
- printf("Error on individual # %d agev[m][i]=%f <%d-%d or > %d+3+%d m=%d; either change agemin or agemax or fix data\n",i, agev[m][i],iagemin,AGEMARGE, iagemax,AGEMARGE,m);
- exit(1);
+ if((int)agev[m][i] <iagemin-AGEMARGE){
+ ierroragemin++;
+ printf("Error on individual # ...%09ld around line %d agev[m][i]=%f <%d-%d=%d m=%d; decrease 'agemin' or fix data\n",num[i],i, agev[m][i],iagemin,AGEMARGE, iagemin-AGEMARGE,m);
+ }
+ if((int)agev[m][i] >iagemax+4+AGEMARGE){
+ ierroragemax++;
+ printf("Error on individual # ...%09ld around line %d agev[m][i]=%f > %d+3+%d=%d m=%d;increase 'agemax' or fix data\n",num[i],i, agev[m][i],iagemax,AGEMARGE, iagemax+AGEMARGE,m);
}
if (s[m][i]>0 && s[m][i]<=nlstate) {
/*if(i>4620) printf(" i=%d m=%d s[m][i]=%d (int)agev[m][i]=%d weight[i]=%f prop=%f\n",i,m,s[m][i],(int)agev[m][m],weight[i],prop[s[m][i]][(int)agev[m][i]]);*/
}
if (s[m][i]>0 && s[m][i]<=nlstate) {
/*if(i>4620) printf(" i=%d m=%d s[m][i]=%d (int)agev[m][i]=%d weight[i]=%f prop=%f\n",i,m,s[m][i],(int)agev[m][m],weight[i],prop[s[m][i]][(int)agev[m][i]]);*/
} /* end bool */
} /* end wave */
} /* end individual */
} /* end bool */
} /* end wave */
} /* end individual */
+ if(ierroragemin>=1 || ierroragemax>=1){
+ if(ierroragemin>=1)
+ printf("%d error(s) on extreme joung age(s) of persons, check data or decrease agemin=%d\n",ierroragemin,iagemin);
+ if(ierroragemax>=1)
+ printf("%d error(s) on extreme old age(s) of persons, check data or increase agemax=%d\n",ierroragemax,iagemax);
+ exit(1);
+ }
for(i=iagemin; i <= iagemax+3; i++){
for(jk=1,posprop=0; jk <=nlstate ; jk++) {
posprop += prop[jk][i];
for(i=iagemin; i <= iagemax+3; i++){
for(jk=1,posprop=0; jk <=nlstate ; jk++) {
posprop += prop[jk][i];
#define __IMACH_VERSION_MAJOR__ 0
#define __IMACH_VERSION_MAJOR__ 0
-#define __IMACH_VERSION_MINOR__ 99s12
+#define __IMACH_VERSION_MINOR__ 99s13
#define __IMACH_VERSION_PATCH__ 0
#define __IMACH_VERSION_PATCH__ 0
-#define __IMACH_VERSION__ "0.99s12"
+#define __IMACH_VERSION__ "0.99s13"