version 1.279, 2017/07/20 13:35:01
|
version 1.283, 2018/04/19 14:49:16
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
Revision 1.283 2018/04/19 14:49:16 brouard |
|
Summary: Some minor bugs fixed |
|
|
|
Revision 1.282 2018/02/27 22:50:02 brouard |
|
*** empty log message *** |
|
|
|
Revision 1.281 2018/02/27 19:25:23 brouard |
|
Summary: Adding second argument for quitting |
|
|
|
Revision 1.280 2018/02/21 07:58:13 brouard |
|
Summary: 0.99r15 |
|
|
|
New Makefile with recent VirtualBox 5.26. Bug in sqrt negatve in imach.c |
|
|
Revision 1.279 2017/07/20 13:35:01 brouard |
Revision 1.279 2017/07/20 13:35:01 brouard |
Summary: temporary working |
Summary: temporary working |
|
|
Line 1044 typedef struct {
|
Line 1058 typedef struct {
|
/* $State$ */ |
/* $State$ */ |
#include "version.h" |
#include "version.h" |
char version[]=__IMACH_VERSION__; |
char version[]=__IMACH_VERSION__; |
char copyright[]="February 2016,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2018"; |
char copyright[]="April 2018,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2018"; |
char fullversion[]="$Revision$ $Date$"; |
char fullversion[]="$Revision$ $Date$"; |
char strstart[80]; |
char strstart[80]; |
char optionfilext[10], optionfilefiname[FILENAMELENGTH]; |
char optionfilext[10], optionfilefiname[FILENAMELENGTH]; |
Line 4357 void freqsummary(char fileres[], double
|
Line 4371 void freqsummary(char fileres[], double
|
double ***freq; /* Frequencies */ |
double ***freq; /* Frequencies */ |
double *x, *y, a=0.,b=0.,r=1., sa=0., sb=0.; /* for regression, y=b+m*x and r is the correlation coefficient */ |
double *x, *y, a=0.,b=0.,r=1., sa=0., sb=0.; /* for regression, y=b+m*x and r is the correlation coefficient */ |
int no=0, linreg(int ifi, int ila, int *no, const double x[], const double y[], double* a, double* b, double* r, double* sa, double * sb); |
int no=0, linreg(int ifi, int ila, int *no, const double x[], const double y[], double* a, double* b, double* r, double* sa, double * sb); |
double *meanq; |
double *meanq, *idq; |
double **meanqt; |
double **meanqt; |
double *pp, **prop, *posprop, *pospropt; |
double *pp, **prop, *posprop, *pospropt; |
double pos=0., posproptt=0., pospropta=0., k2, dateintsum=0,k2cpt=0; |
double pos=0., posproptt=0., pospropta=0., k2, dateintsum=0,k2cpt=0; |
Line 4370 void freqsummary(char fileres[], double
|
Line 4384 void freqsummary(char fileres[], double
|
pospropt=vector(1,nlstate); /* Counting the number of transition starting from a live state */ |
pospropt=vector(1,nlstate); /* Counting the number of transition starting from a live state */ |
/* prop=matrix(1,nlstate,iagemin,iagemax+3); */ |
/* prop=matrix(1,nlstate,iagemin,iagemax+3); */ |
meanq=vector(1,nqfveff); /* Number of Quantitative Fixed Variables Effective */ |
meanq=vector(1,nqfveff); /* Number of Quantitative Fixed Variables Effective */ |
|
idq=vector(1,nqfveff); /* Number of Quantitative Fixed Variables Effective */ |
meanqt=matrix(1,lastpass,1,nqtveff); |
meanqt=matrix(1,lastpass,1,nqtveff); |
strcpy(fileresp,"P_"); |
strcpy(fileresp,"P_"); |
strcat(fileresp,fileresu); |
strcat(fileresp,fileresu); |
Line 4478 Title=%s <br>Datafile=%s Firstpass=%d La
|
Line 4493 Title=%s <br>Datafile=%s Firstpass=%d La
|
posprop[i]=0; |
posprop[i]=0; |
pospropt[i]=0; |
pospropt[i]=0; |
} |
} |
/* for (z1=1; z1<= nqfveff; z1++) { */ |
for (z1=1; z1<= nqfveff; z1++) { /* zeroing for each combination j1 as well as for the total */ |
/* meanq[z1]+=0.; */ |
idq[z1]+=0.; |
|
meanq[z1]+=0.; |
|
} |
|
/* for (z1=1; z1<= nqtveff; z1++) { */ |
/* for(m=1;m<=lastpass;m++){ */ |
/* for(m=1;m<=lastpass;m++){ */ |
/* meanqt[m][z1]=0.; */ |
/* meanqt[m][z1]=0.; */ |
/* } */ |
/* } */ |
/* } */ |
/* } */ |
|
|
/* dateintsum=0; */ |
/* dateintsum=0; */ |
/* k2cpt=0; */ |
/* k2cpt=0; */ |
|
|
Line 4494 Title=%s <br>Datafile=%s Firstpass=%d La
|
Line 4511 Title=%s <br>Datafile=%s Firstpass=%d La
|
if(j !=0){ |
if(j !=0){ |
if(anyvaryingduminmodel==0){ /* If All fixed covariates */ |
if(anyvaryingduminmodel==0){ /* If All fixed covariates */ |
if (cptcoveff >0) { /* Filter is here: Must be looked at for model=V1+V2+V3+V4 */ |
if (cptcoveff >0) { /* Filter is here: Must be looked at for model=V1+V2+V3+V4 */ |
/* for (z1=1; z1<= nqfveff; z1++) { */ |
/* for (z1=1; z1<= nqfveff; z1++) { */ |
/* meanq[z1]+=coqvar[Tvar[z1]][iind]; /\* Computes mean of quantitative with selected filter *\/ */ |
/* meanq[z1]+=coqvar[Tvar[z1]][iind]; /\* Computes mean of quantitative with selected filter *\/ */ |
/* } */ |
/* } */ |
for (z1=1; z1<=cptcoveff; z1++) { /* loops on covariates in the model */ |
for (z1=1; z1<=cptcoveff; z1++) { /* loops on covariates in the model */ |
Line 4560 Title=%s <br>Datafile=%s Firstpass=%d La
|
Line 4577 Title=%s <br>Datafile=%s Firstpass=%d La
|
/* freq[s[m][iind]][s[m+1][iind]][(int)((agebegin+ageend)/2.)] += weight[iind]; */ |
/* freq[s[m][iind]][s[m+1][iind]][(int)((agebegin+ageend)/2.)] += weight[iind]; */ |
freq[s[m][iind]][s[m+1][iind]][iagemax+3] += weight[iind]; /* Total is in iagemax+3 *//* At age of beginning of transition, where status is known */ |
freq[s[m][iind]][s[m+1][iind]][iagemax+3] += weight[iind]; /* Total is in iagemax+3 *//* At age of beginning of transition, where status is known */ |
} |
} |
|
for (z1=1; z1<= nqfveff; z1++) { |
|
idq[z1]++; |
|
meanq[z1]+=covar[ncovcol+z1][iind]; /* *weight[iind];*/ /* Computes mean of quantitative with selected filter */ |
|
/* meanq[z1]+=coqvar[Tvar[z1]][iind]; /\* Computes mean of quantitative with selected filter *\/ */ |
|
} |
} /* end if between passes */ |
} /* end if between passes */ |
if ((agev[m][iind]>1) && (agev[m][iind]< (iagemax+3)) && (anint[m][iind]!=9999) && (mint[m][iind]!=99) && (j==0)) { |
if ((agev[m][iind]>1) && (agev[m][iind]< (iagemax+3)) && (anint[m][iind]!=9999) && (mint[m][iind]!=99) && (j==0)) { |
dateintsum=dateintsum+k2; /* on all covariates ?*/ |
dateintsum=dateintsum+k2; /* on all covariates ?*/ |
Line 4607 Title=%s <br>Datafile=%s Firstpass=%d La
|
Line 4629 Title=%s <br>Datafile=%s Firstpass=%d La
|
fprintf(ficresphtmfr, "**********</h3>\n"); |
fprintf(ficresphtmfr, "**********</h3>\n"); |
fprintf(ficlog, "**********\n"); |
fprintf(ficlog, "**********\n"); |
} |
} |
|
/* |
|
Printing means of quantitative variables if any |
|
*/ |
|
for (z1=1; z1<= nqfveff; z1++) { |
|
fprintf(ficresphtmfr,"V quantitative id %d, number of idividuals= %f, sum=%f", z1, idq[z1], meanq[z1]); |
|
fprintf(ficresphtmfr,", mean=%f<p>\n",meanq[z1]/idq[z1]); |
|
} |
|
/* for (z1=1; z1<= nqtveff; z1++) { */ |
|
/* for(m=1;m<=lastpass;m++){ */ |
|
/* fprintf(ficresphtmfr,"V quantitative id %d, pass id=%d, mean=%f<p>\n", z1, m, meanqt[m][z1]); */ |
|
/* } */ |
|
/* } */ |
|
|
fprintf(ficresphtm,"<table style=\"text-align:center; border: 1px solid\">"); |
fprintf(ficresphtm,"<table style=\"text-align:center; border: 1px solid\">"); |
if((cptcoveff==0 && nj==1)|| nj==2 ) /* no covariate and first pass */ |
if((cptcoveff==0 && nj==1)|| nj==2 ) /* no covariate and first pass */ |
fprintf(ficresp, " Age"); |
fprintf(ficresp, " Age"); |
Line 4887 Title=%s <br>Datafile=%s Firstpass=%d La
|
Line 4922 Title=%s <br>Datafile=%s Firstpass=%d La
|
fclose(ficresp); |
fclose(ficresp); |
fclose(ficresphtm); |
fclose(ficresphtm); |
fclose(ficresphtmfr); |
fclose(ficresphtmfr); |
|
free_vector(idq,1,nqfveff); |
free_vector(meanq,1,nqfveff); |
free_vector(meanq,1,nqfveff); |
free_matrix(meanqt,1,lastpass,1,nqtveff); |
free_matrix(meanqt,1,lastpass,1,nqtveff); |
free_vector(x, iagemin-AGEMARGE, iagemax+4+AGEMARGE); |
free_vector(x, iagemin-AGEMARGE, iagemax+4+AGEMARGE); |
Line 6642 To be simple, these graphs help to under
|
Line 6678 To be simple, these graphs help to under
|
} |
} |
|
|
/* Eigen vectors */ |
/* Eigen vectors */ |
v11=(1./sqrt(1+(v1-lc1)*(v1-lc1)/cv12/cv12)); |
if(1+(v1-lc1)*(v1-lc1)/cv12/cv12 <1.e-5){ |
|
printf(" Error sqrt of a negative number: %lf\n",1+(v1-lc1)*(v1-lc1)/cv12/cv12); |
|
fprintf(ficlog," Error sqrt of a negative number: %lf\n",1+(v1-lc1)*(v1-lc1)/cv12/cv12); |
|
v11=(1./sqrt(fabs(1+(v1-lc1)*(v1-lc1)/cv12/cv12))); |
|
}else |
|
v11=(1./sqrt(1+(v1-lc1)*(v1-lc1)/cv12/cv12)); |
/*v21=sqrt(1.-v11*v11); *//* error */ |
/*v21=sqrt(1.-v11*v11); *//* error */ |
v21=(lc1-v1)/cv12*v11; |
v21=(lc1-v1)/cv12*v11; |
v12=-v21; |
v12=-v21; |
Line 6673 To be simple, these graphs help to under
|
Line 6714 To be simple, these graphs help to under
|
fprintf(ficgp,"\nset label \"%d\" at %11.3e,%11.3e center",(int) age, mu1,mu2); |
fprintf(ficgp,"\nset label \"%d\" at %11.3e,%11.3e center",(int) age, mu1,mu2); |
fprintf(ficgp,"\n# Age %d, p%1d%1d - p%1d%1d",(int) age, k1,l1,k2,l2); |
fprintf(ficgp,"\n# Age %d, p%1d%1d - p%1d%1d",(int) age, k1,l1,k2,l2); |
fprintf(ficgp,"\nplot [-pi:pi] %11.3e+ %.3f*(%11.3e*%11.3e*cos(t)+%11.3e*%11.3e*sin(t)), %11.3e +%.3f*(%11.3e*%11.3e*cos(t)+%11.3e*%11.3e*sin(t)) not", \ |
fprintf(ficgp,"\nplot [-pi:pi] %11.3e+ %.3f*(%11.3e*%11.3e*cos(t)+%11.3e*%11.3e*sin(t)), %11.3e +%.3f*(%11.3e*%11.3e*cos(t)+%11.3e*%11.3e*sin(t)) not", \ |
mu1,std,v11,sqrt(lc1),v12,sqrt(fabs(lc2)), \ |
mu1,std,v11,sqrt(fabs(lc1)),v12,sqrt(fabs(lc2)), \ |
mu2,std,v21,sqrt(lc1),v22,sqrt(fabs(lc2))); /* For gnuplot only */ |
mu2,std,v21,sqrt(fabs(lc1)),v22,sqrt(fabs(lc2))); /* For gnuplot only */ |
}else{ |
}else{ |
first=0; |
first=0; |
fprintf(fichtmcov," %d (%.3f),",(int) age, c12); |
fprintf(fichtmcov," %d (%.3f),",(int) age, c12); |
Line 6849 divided by h: <sub>h</sub>P<sub>ij</sub>
|
Line 6890 divided by h: <sub>h</sub>P<sub>ij</sub>
|
for(cpt=1; cpt<=nlstate;cpt++){ |
for(cpt=1; cpt<=nlstate;cpt++){ |
fprintf(fichtm,"<br>\n- Survival functions from state %d in each live state and total.\ |
fprintf(fichtm,"<br>\n- Survival functions from state %d in each live state and total.\ |
Or probability to survive in various states (1 to %d) being in state %d at different ages. \ |
Or probability to survive in various states (1 to %d) being in state %d at different ages. \ |
<a href=\"%s_%d-%d-%d.svg\">%s_%d%d-%d.svg</a><br> <img src=\"%s_%d-%d-%d.svg\">", cpt, nlstate, cpt, subdirf2(optionfilefiname,"LIJT_"),cpt,k1,nres,subdirf2(optionfilefiname,"LIJT_"),cpt,k1,nres,subdirf2(optionfilefiname,"LIJT_"),cpt,k1,nres); |
<a href=\"%s_%d-%d-%d.svg\">%s_%d-%d-%d.svg</a><br> <img src=\"%s_%d-%d-%d.svg\">", cpt, nlstate, cpt, subdirf2(optionfilefiname,"LIJT_"),cpt,k1,nres,subdirf2(optionfilefiname,"LIJT_"),cpt,k1,nres,subdirf2(optionfilefiname,"LIJT_"),cpt,k1,nres); |
} |
} |
/* Period (stable) prevalence in each health state */ |
/* Period (stable) prevalence in each health state */ |
for(cpt=1; cpt<=nlstate;cpt++){ |
for(cpt=1; cpt<=nlstate;cpt++){ |
Line 10785 int main(int argc, char *argv[])
|
Line 10826 int main(int argc, char *argv[])
|
if(pathr[0] == '\0') break; /* Dirty */ |
if(pathr[0] == '\0') break; /* Dirty */ |
} |
} |
} |
} |
|
else if (argc<=2){ |
|
strcpy(pathtot,argv[1]); |
|
} |
else{ |
else{ |
strcpy(pathtot,argv[1]); |
strcpy(pathtot,argv[1]); |
|
strcpy(z,argv[2]); |
|
printf("\nargv[2]=%s z=%c\n",argv[2],z[0]); |
} |
} |
/*if(getcwd(pathcd, MAXLINE)!= NULL)printf ("Error pathcd\n");*/ |
/*if(getcwd(pathcd, MAXLINE)!= NULL)printf ("Error pathcd\n");*/ |
/*cygwin_split_path(pathtot,path,optionfile); |
/*cygwin_split_path(pathtot,path,optionfile); |
Line 10864 int main(int argc, char *argv[])
|
Line 10910 int main(int argc, char *argv[])
|
exit(70); |
exit(70); |
} |
} |
|
|
|
|
|
|
strcpy(filereso,"o"); |
strcpy(filereso,"o"); |
strcat(filereso,fileresu); |
strcat(filereso,fileresu); |
if((ficparo=fopen(filereso,"w"))==NULL) { /* opened on subdirectory */ |
if((ficparo=fopen(filereso,"w"))==NULL) { /* opened on subdirectory */ |
Line 10929 int main(int argc, char *argv[])
|
Line 10973 int main(int argc, char *argv[])
|
title, datafile, &lastobs, &firstpass,&lastpass)) !=EOF){ |
title, datafile, &lastobs, &firstpass,&lastpass)) !=EOF){ |
if (num_filled != 5) { |
if (num_filled != 5) { |
printf("Should be 5 parameters\n"); |
printf("Should be 5 parameters\n"); |
|
fprintf(ficlog,"Should be 5 parameters\n"); |
} |
} |
numlinepar++; |
numlinepar++; |
printf("title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\n", title, datafile, lastobs, firstpass,lastpass); |
printf("title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\n", title, datafile, lastobs, firstpass,lastpass); |
|
fprintf(ficparo,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\n", title, datafile, lastobs, firstpass,lastpass); |
|
fprintf(ficres,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\n", title, datafile, lastobs, firstpass,lastpass); |
|
fprintf(ficlog,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\n", title, datafile, lastobs, firstpass,lastpass); |
} |
} |
/* Second parameter line */ |
/* Second parameter line */ |
while(fgets(line, MAXLINE, ficpar)) { |
while(fgets(line, MAXLINE, ficpar)) { |
/* If line starts with a # it is a comment */ |
/* while(fscanf(ficpar,"%[^\n]", line)) { */ |
|
/* If line starts with a # it is a comment. Strangely fgets reads the EOL and fputs doesn't */ |
if (line[0] == '#') { |
if (line[0] == '#') { |
numlinepar++; |
numlinepar++; |
fputs(line,stdout); |
printf("%s",line); |
fputs(line,ficparo); |
fprintf(ficres,"%s",line); |
fputs(line,ficres); |
fprintf(ficparo,"%s",line); |
fputs(line,ficlog); |
fprintf(ficlog,"%s",line); |
continue; |
continue; |
}else |
}else |
break; |
break; |
Line 10951 int main(int argc, char *argv[])
|
Line 11000 int main(int argc, char *argv[])
|
if (num_filled != 11) { |
if (num_filled != 11) { |
printf("Not 11 parameters, for example:ftol=1.e-8 stepm=12 ncovcol=2 nqv=1 ntv=2 nqtv=1 nlstate=2 ndeath=1 maxwav=3 mle=1 weight=1\n"); |
printf("Not 11 parameters, for example:ftol=1.e-8 stepm=12 ncovcol=2 nqv=1 ntv=2 nqtv=1 nlstate=2 ndeath=1 maxwav=3 mle=1 weight=1\n"); |
printf("but line=%s\n",line); |
printf("but line=%s\n",line); |
|
fprintf(ficlog,"Not 11 parameters, for example:ftol=1.e-8 stepm=12 ncovcol=2 nqv=1 ntv=2 nqtv=1 nlstate=2 ndeath=1 maxwav=3 mle=1 weight=1\n"); |
|
fprintf(ficlog,"but line=%s\n",line); |
} |
} |
printf("ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); |
printf("ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); |
|
fprintf(ficparo,"ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); |
|
fprintf(ficres,"ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); |
|
fprintf(ficlog,"ftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\n",ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, mle, weightopt); |
} |
} |
/* ftolpl=6*ftol*1.e5; /\* 6.e-3 make convergences in less than 80 loops for the prevalence limit *\/ */ |
/* ftolpl=6*ftol*1.e5; /\* 6.e-3 make convergences in less than 80 loops for the prevalence limit *\/ */ |
/*ftolpl=6.e-4; *//* 6.e-3 make convergences in less than 80 loops for the prevalence limit */ |
/*ftolpl=6.e-4; *//* 6.e-3 make convergences in less than 80 loops for the prevalence limit */ |
Line 10961 int main(int argc, char *argv[])
|
Line 11015 int main(int argc, char *argv[])
|
/* If line starts with a # it is a comment */ |
/* If line starts with a # it is a comment */ |
if (line[0] == '#') { |
if (line[0] == '#') { |
numlinepar++; |
numlinepar++; |
fputs(line,stdout); |
printf("%s",line); |
fputs(line,ficparo); |
fprintf(ficres,"%s",line); |
fputs(line,ficres); |
fprintf(ficparo,"%s",line); |
fputs(line,ficlog); |
fprintf(ficlog,"%s",line); |
continue; |
continue; |
}else |
}else |
break; |
break; |
Line 10985 int main(int argc, char *argv[])
|
Line 11039 int main(int argc, char *argv[])
|
} |
} |
/* printf(" model=1+age%s modeltemp= %s, model=%s\n",model, modeltemp, model);fflush(stdout); */ |
/* printf(" model=1+age%s modeltemp= %s, model=%s\n",model, modeltemp, model);fflush(stdout); */ |
printf("model=1+age+%s\n",model);fflush(stdout); |
printf("model=1+age+%s\n",model);fflush(stdout); |
|
fprintf(ficparo,"model=1+age+%s\n",model);fflush(stdout); |
|
fprintf(ficres,"model=1+age+%s\n",model);fflush(stdout); |
|
fprintf(ficlog,"model=1+age+%s\n",model);fflush(stdout); |
} |
} |
/* fscanf(ficpar,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%lf stepm=%d ncovcol=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d model=1+age+%s\n",title, datafile, &lastobs, &firstpass,&lastpass,&ftol, &stepm, &ncovcol, &nlstate,&ndeath, &maxwav, &mle, &weightopt,model); */ |
/* fscanf(ficpar,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%lf stepm=%d ncovcol=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d model=1+age+%s\n",title, datafile, &lastobs, &firstpass,&lastpass,&ftol, &stepm, &ncovcol, &nlstate,&ndeath, &maxwav, &mle, &weightopt,model); */ |
/* numlinepar=numlinepar+3; /\* In general *\/ */ |
/* numlinepar=numlinepar+3; /\* In general *\/ */ |
/* printf("title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s\n", title, datafile, lastobs, firstpass,lastpass,ftol, stepm, ncovcol, nlstate,ndeath, maxwav, mle, weightopt,model); */ |
/* printf("title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s\n", title, datafile, lastobs, firstpass,lastpass,ftol, stepm, ncovcol, nlstate,ndeath, maxwav, mle, weightopt,model); */ |
fprintf(ficparo,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol,stepm,ncovcol, nqv, ntv, nqtv, nlstate,ndeath,maxwav, mle, weightopt,model); |
/* fprintf(ficparo,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol,stepm,ncovcol, nqv, ntv, nqtv, nlstate,ndeath,maxwav, mle, weightopt,model); */ |
fprintf(ficlog,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol,stepm,ncovcol, nqv, ntv, nqtv, nlstate,ndeath,maxwav, mle, weightopt,model); |
/* fprintf(ficlog,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle=%d weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol,stepm,ncovcol, nqv, ntv, nqtv, nlstate,ndeath,maxwav, mle, weightopt,model); */ |
fflush(ficlog); |
fflush(ficlog); |
/* if(model[0]=='#'|| model[0]== '\0'){ */ |
/* if(model[0]=='#'|| model[0]== '\0'){ */ |
if(model[0]=='#'){ |
if(model[0]=='#'){ |
Line 11853 Please run with mle=-1 to get a correct
|
Line 11910 Please run with mle=-1 to get a correct
|
printf("\n"); |
printf("\n"); |
|
|
/*--------- results files --------------*/ |
/*--------- results files --------------*/ |
fprintf(ficres,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle= 0 weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, weightopt,model); |
/* fprintf(ficres,"title=%s datafile=%s lastobs=%d firstpass=%d lastpass=%d\nftol=%e stepm=%d ncovcol=%d nqv=%d ntv=%d nqtv=%d nlstate=%d ndeath=%d maxwav=%d mle= 0 weight=%d\nmodel=1+age+%s.\n", title, datafile, lastobs, firstpass,lastpass,ftol, stepm, ncovcol, nqv, ntv, nqtv, nlstate, ndeath, maxwav, weightopt,model); */ |
|
|
|
|
fprintf(ficres,"# Parameters nlstate*nlstate*ncov a12*1 + b12 * age + ...\n"); |
fprintf(ficres,"# Parameters nlstate*nlstate*ncov a12*1 + b12 * age + ...\n"); |
Line 12651 Please run with mle=-1 to get a correct
|
Line 12708 Please run with mle=-1 to get a correct
|
fclose(ficlog); |
fclose(ficlog); |
/*------ End -----------*/ |
/*------ End -----------*/ |
|
|
|
|
|
/* Executes gnuplot */ |
|
|
printf("Before Current directory %s!\n",pathcd); |
printf("Before Current directory %s!\n",pathcd); |
#ifdef WIN32 |
#ifdef WIN32 |
Line 12719 end:
|
Line 12778 end:
|
printf("\nType q for exiting: "); fflush(stdout); |
printf("\nType q for exiting: "); fflush(stdout); |
scanf("%s",z); |
scanf("%s",z); |
} |
} |
|
printf("End\n"); |
|
exit(0); |
} |
} |