|
|
| version 1.54, 2002/07/24 09:07:45 | version 1.58, 2002/07/26 12:29:55 |
|---|---|
| Line 60 | Line 60 |
| /*#define GNUPLOTPROGRAM "..\\gp37mgw\\wgnuplot"*/ | /*#define GNUPLOTPROGRAM "..\\gp37mgw\\wgnuplot"*/ |
| #define FILENAMELENGTH 80 | #define FILENAMELENGTH 80 |
| /*#define DEBUG*/ | /*#define DEBUG*/ |
| #define unix | #define windows |
| #define GLOCK_ERROR_NOPATH -1 /* empty path */ | #define GLOCK_ERROR_NOPATH -1 /* empty path */ |
| #define GLOCK_ERROR_GETCWD -2 /* cannot get cwd */ | #define GLOCK_ERROR_GETCWD -2 /* cannot get cwd */ |
| Line 163 int estepm; | Line 163 int estepm; |
| int m,nb; | int m,nb; |
| int *num, firstpass=0, lastpass=4,*cod, *ncodemax, *Tage; | int *num, firstpass=0, lastpass=4,*cod, *ncodemax, *Tage; |
| double **agev,*moisnais, *annais, *moisdc, *andc,**mint, **anint; | double **agev,*moisnais, *annais, *moisdc, *andc,**mint, **anint; |
| double **pmmij, ***probs, ***mobaverage; | double **pmmij, ***probs; |
| double dateintmean=0; | double dateintmean=0; |
| double *weight; | double *weight; |
| Line 1284 void freqsummary(char fileres[], int ag | Line 1284 void freqsummary(char fileres[], int ag |
| if (covar[Tvaraff[z1]][i]!= nbcode[Tvaraff[z1]][codtab[j1][z1]]) | if (covar[Tvaraff[z1]][i]!= nbcode[Tvaraff[z1]][codtab[j1][z1]]) |
| bool=0; | bool=0; |
| } | } |
| if (bool==1) { | if (bool==1){ |
| for(m=firstpass; m<=lastpass; m++){ | for(m=firstpass; m<=lastpass; m++){ |
| k2=anint[m][i]+(mint[m][i]/12.); | k2=anint[m][i]+(mint[m][i]/12.); |
| if ((k2>=dateprev1) && (k2<=dateprev2)) { | if ((k2>=dateprev1) && (k2<=dateprev2)) { |
| Line 1575 void concatwav(int wav[], int **dh, int | Line 1575 void concatwav(int wav[], int **dh, int |
| /*********** Tricode ****************************/ | /*********** Tricode ****************************/ |
| void tricode(int *Tvar, int **nbcode, int imx) | void tricode(int *Tvar, int **nbcode, int imx) |
| { | { |
| int Ndum[20],ij=1, k, j, i; | |
| int Ndum[20],ij=1, k, j, i, maxncov=19; | |
| int cptcode=0; | int cptcode=0; |
| cptcoveff=0; | cptcoveff=0; |
| for (k=0; k<19; k++) Ndum[k]=0; | for (k=0; k<maxncov; k++) Ndum[k]=0; |
| for (k=1; k<=7; k++) ncodemax[k]=0; | for (k=1; k<=7; k++) ncodemax[k]=0; |
| for (j=1; j<=(cptcovn+2*cptcovprod); j++) { | for (j=1; j<=(cptcovn+2*cptcovprod); j++) { |
| for (i=1; i<=imx; i++) { | for (i=1; i<=imx; i++) { /*reads the data file to get the maximum |
| ij=(int)(covar[Tvar[j]][i]); | modality*/ |
| Ndum[ij]++; | ij=(int)(covar[Tvar[j]][i]); /* ij is the modality of this individual*/ |
| Ndum[ij]++; /*store the modality */ | |
| /*printf("i=%d ij=%d Ndum[ij]=%d imx=%d",i,ij,Ndum[ij],imx);*/ | /*printf("i=%d ij=%d Ndum[ij]=%d imx=%d",i,ij,Ndum[ij],imx);*/ |
| if (ij > cptcode) cptcode=ij; | if (ij > cptcode) cptcode=ij; /* getting the maximum of covariable |
| Tvar[j]. If V=sex and male is 0 and | |
| female is 1, then cptcode=1.*/ | |
| } | } |
| for (i=0; i<=cptcode; i++) { | for (i=0; i<=cptcode; i++) { |
| if(Ndum[i]!=0) ncodemax[j]++; | if(Ndum[i]!=0) ncodemax[j]++; /* Nomber of modalities of the j th covariates. In fact ncodemax[j]=2 (dichotom. variables) but it can be more */ |
| } | } |
| ij=1; | |
| ij=1; | |
| for (i=1; i<=ncodemax[j]; i++) { | for (i=1; i<=ncodemax[j]; i++) { |
| for (k=0; k<=19; k++) { | for (k=0; k<= maxncov; k++) { |
| if (Ndum[k] != 0) { | if (Ndum[k] != 0) { |
| nbcode[Tvar[j]][ij]=k; | nbcode[Tvar[j]][ij]=k; |
| /* store the modality in an array. k is a modality. If we have model=V1+V1*sex then: nbcode[1][1]=0 ; nbcode[1][2]=1; nbcode[2][1]=0 ; nbcode[2][2]=1; */ | |
| ij++; | ij++; |
| } | } |
| Line 1608 void tricode(int *Tvar, int **nbcode, in | Line 1612 void tricode(int *Tvar, int **nbcode, in |
| } | } |
| } | } |
| for (k=0; k<19; k++) Ndum[k]=0; | for (k=0; k< maxncov; k++) Ndum[k]=0; |
| for (i=1; i<=ncovmodel-2; i++) { | for (i=1; i<=ncovmodel-2; i++) { |
| /* Listing of all covariables in staement model to see if some covariates appear twice. For example, V1 appears twice in V1+V1*V2.*/ | |
| ij=Tvar[i]; | ij=Tvar[i]; |
| Ndum[ij]++; | Ndum[ij]++; |
| } | } |
| ij=1; | ij=1; |
| for (i=1; i<=10; i++) { | for (i=1; i<= maxncov; i++) { |
| if((Ndum[i]!=0) && (i<=ncovcol)){ | if((Ndum[i]!=0) && (i<=ncovcol)){ |
| Tvaraff[ij]=i; | Tvaraff[ij]=i; /*For printing */ |
| ij++; | ij++; |
| } | } |
| } | } |
| cptcoveff=ij-1; | cptcoveff=ij-1; /*Number of simple covariates*/ |
| } | } |
| /*********** Health Expectancies ****************/ | /*********** Health Expectancies ****************/ |
| Line 1819 void varevsij(char optionfilefiname[], d | Line 1824 void varevsij(char optionfilefiname[], d |
| double ***mobaverage; | double ***mobaverage; |
| int theta; | int theta; |
| char digit[4]; | char digit[4]; |
| char digitp[16]; | char digitp[25]; |
| char fileresprobmorprev[FILENAMELENGTH]; | char fileresprobmorprev[FILENAMELENGTH]; |
| if(popbased==1) | if(popbased==1){ |
| strcpy(digitp,"-populbased-"); | if(mobilav!=0) |
| else | strcpy(digitp,"-populbased-mobilav-"); |
| else strcpy(digitp,"-populbased-nomobil-"); | |
| } | |
| else | |
| strcpy(digitp,"-stablbased-"); | strcpy(digitp,"-stablbased-"); |
| if(mobilav!=0) | |
| strcat(digitp,"mobilav-"); | |
| else | |
| strcat(digitp,"nomobil-"); | |
| if (mobilav!=0) { | if (mobilav!=0) { |
| mobaverage= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX); | mobaverage= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX); |
| if (movingaverage(probs, bage, fage, mobaverage,mobilav)!=0){ | if (movingaverage(probs, bage, fage, mobaverage,mobilav)!=0){ |
| Line 2087 void varevsij(char optionfilefiname[], d | Line 2092 void varevsij(char optionfilefiname[], d |
| free_matrix(doldmp,nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath); | free_matrix(doldmp,nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath); |
| free_matrix(dnewmp,nlstate+1,nlstate+ndeath,1,npar); | free_matrix(dnewmp,nlstate+1,nlstate+ndeath,1,npar); |
| free_matrix(varppt,nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath); | free_matrix(varppt,nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath); |
| free_ma3x(mobaverage,1, AGESUP,1,NCOVMAX, 1,NCOVMAX); | if (mobilav!=0) free_ma3x(mobaverage,1, AGESUP,1,NCOVMAX, 1,NCOVMAX); |
| fclose(ficresprobmorprev); | fclose(ficresprobmorprev); |
| fclose(ficgp); | fclose(ficgp); |
| fclose(fichtm); | fclose(fichtm); |
| } | } |
| /************ Variance of prevlim ******************/ | /************ Variance of prevlim ******************/ |
| Line 2774 m=pow(2,cptcoveff); | Line 2778 m=pow(2,cptcoveff); |
| int movingaverage(double ***probs, double bage,double fage, double ***mobaverage, int mobilav){ | int movingaverage(double ***probs, double bage,double fage, double ***mobaverage, int mobilav){ |
| int i, cpt, cptcod; | int i, cpt, cptcod; |
| int modcovmax =1; | |
| int mobilavrange, mob; | int mobilavrange, mob; |
| double age; | double age; |
| modcovmax=2*cptcoveff;/* Max number of modalities. We suppose | |
| a covariate has 2 modalities */ | |
| if (cptcovn<1) modcovmax=1; /* At least 1 pass */ | |
| if(mobilav==1||mobilav ==3 ||mobilav==5 ||mobilav== 7){ | if(mobilav==1||mobilav ==3 ||mobilav==5 ||mobilav== 7){ |
| if(mobilav==1) mobilavrange=5; /* default */ | if(mobilav==1) mobilavrange=5; /* default */ |
| else mobilavrange=mobilav; | else mobilavrange=mobilav; |
| for (age=bage; age<=fage; age++) | for (age=bage; age<=fage; age++) |
| for (i=1; i<=nlstate;i++) | for (i=1; i<=nlstate;i++) |
| for (cptcod=1;cptcod<=ncodemax[cptcov];cptcod++) | for (cptcod=1;cptcod<=modcovmax;cptcod++) |
| mobaverage[(int)age][i][cptcod]=probs[(int)age][i][cptcod]; | mobaverage[(int)age][i][cptcod]=probs[(int)age][i][cptcod]; |
| /* We keep the original values on the extreme ages bage, fage and for | /* We keep the original values on the extreme ages bage, fage and for |
| fage+1 and bage-1 we use a 3 terms moving average; for fage+2 bage+2 | fage+1 and bage-1 we use a 3 terms moving average; for fage+2 bage+2 |
| Line 2790 int movingaverage(double ***probs, doubl | Line 2800 int movingaverage(double ***probs, doubl |
| for (mob=3;mob <=mobilavrange;mob=mob+2){ | for (mob=3;mob <=mobilavrange;mob=mob+2){ |
| for (age=bage+(mob-1)/2; age<=fage-(mob-1)/2; age++){ | for (age=bage+(mob-1)/2; age<=fage-(mob-1)/2; age++){ |
| for (i=1; i<=nlstate;i++){ | for (i=1; i<=nlstate;i++){ |
| for (cptcod=1;cptcod<=ncodemax[cptcoveff];cptcod++){ | for (cptcod=1;cptcod<=modcovmax;cptcod++){ |
| mobaverage[(int)age][i][cptcod] =probs[(int)age][i][cptcod]; | mobaverage[(int)age][i][cptcod] =probs[(int)age][i][cptcod]; |
| for (cpt=1;cpt<=(mob-1)/2;cpt++){ | for (cpt=1;cpt<=(mob-1)/2;cpt++){ |
| mobaverage[(int)age][i][cptcod] +=probs[(int)age-cpt][i][cptcod]; | mobaverage[(int)age][i][cptcod] +=probs[(int)age-cpt][i][cptcod]; |
| Line 2814 prevforecast(char fileres[], double anpr | Line 2824 prevforecast(char fileres[], double anpr |
| double calagedate, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean; | double calagedate, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean; |
| double *popeffectif,*popcount; | double *popeffectif,*popcount; |
| double ***p3mat; | double ***p3mat; |
| double ***mobaverage; | |
| char fileresf[FILENAMELENGTH]; | char fileresf[FILENAMELENGTH]; |
| agelim=AGESUP; | agelim=AGESUP; |
| calagedate=(anproj1+mproj1/12.+jproj1/365.-dateintmean)*YEARM; | calagedate=(anproj1+mproj1/12.+jproj1/365.-dateintmean)*YEARM; |
| prevalence(ageminpar, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2, calagedate); | prevalence(ageminpar, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2, calagedate); |
| Line 2921 populforecast(char fileres[], double anp | Line 2932 populforecast(char fileres[], double anp |
| double calagedate, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean; | double calagedate, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean; |
| double *popeffectif,*popcount; | double *popeffectif,*popcount; |
| double ***p3mat,***tabpop,***tabpopprev; | double ***p3mat,***tabpop,***tabpopprev; |
| double ***mobaverage; | |
| char filerespop[FILENAMELENGTH]; | char filerespop[FILENAMELENGTH]; |
| tabpop= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX); | tabpop= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX); |
| Line 3208 while((c=getc(ficpar))=='#' && c!= EOF){ | Line 3220 while((c=getc(ficpar))=='#' && c!= EOF){ |
| covar=matrix(0,NCOVMAX,1,n); | covar=matrix(0,NCOVMAX,1,n); |
| cptcovn=0; | cptcovn=0; /*Number of covariates, i.e. number of '+' in model statement*/ |
| if (strlen(model)>1) cptcovn=nbocc(model,'+')+1; | if (strlen(model)>1) cptcovn=nbocc(model,'+')+1; |
| ncovmodel=2+cptcovn; | ncovmodel=2+cptcovn; /*Number of variables = cptcovn + intercept + age */ |
| nvar=ncovmodel-1; /* Suppressing age as a basic covariate */ | nvar=ncovmodel-1; /* Suppressing age as a basic covariate */ |
| /* Read guess parameters */ | /* Read guess parameters */ |
| Line 3249 while((c=getc(ficpar))=='#' && c!= EOF){ | Line 3261 while((c=getc(ficpar))=='#' && c!= EOF){ |
| fprintf(ficparo,"\n"); | fprintf(ficparo,"\n"); |
| } | } |
| npar= (nlstate+ndeath-1)*nlstate*ncovmodel; | npar= (nlstate+ndeath-1)*nlstate*ncovmodel; /* Number of parameters*/ |
| p=param[1][1]; | p=param[1][1]; |
| Line 3408 while((c=getc(ficpar))=='#' && c!= EOF){ | Line 3420 while((c=getc(ficpar))=='#' && c!= EOF){ |
| Tvard=imatrix(1,15,1,2); | Tvard=imatrix(1,15,1,2); |
| Tage=ivector(1,15); | Tage=ivector(1,15); |
| if (strlen(model) >1){ | if (strlen(model) >1){ /* If there is at least 1 covariate */ |
| j=0, j1=0, k1=1, k2=1; | j=0, j1=0, k1=1, k2=1; |
| j=nbocc(model,'+'); | j=nbocc(model,'+'); /* j=Number of '+' */ |
| j1=nbocc(model,'*'); | j1=nbocc(model,'*'); /* j1=Number of '*' */ |
| cptcovn=j+1; | cptcovn=j+1; |
| cptcovprod=j1; | cptcovprod=j1; /*Number of products */ |
| strcpy(modelsav,model); | strcpy(modelsav,model); |
| if ((strcmp(model,"age")==0) || (strcmp(model,"age*age")==0)){ | if ((strcmp(model,"age")==0) || (strcmp(model,"age*age")==0)){ |
| Line 3422 while((c=getc(ficpar))=='#' && c!= EOF){ | Line 3434 while((c=getc(ficpar))=='#' && c!= EOF){ |
| goto end; | goto end; |
| } | } |
| /* This loop fill the array Tvar from the string 'model'.*/ | |
| for(i=(j+1); i>=1;i--){ | for(i=(j+1); i>=1;i--){ |
| cutv(stra,strb,modelsav,'+'); /* keeps in strb after the last + */ | cutv(stra,strb,modelsav,'+'); /* keeps in strb after the last + */ |
| if (nbocc(modelsav,'+')==0) strcpy(strb,modelsav); /* and analyze it */ | if (nbocc(modelsav,'+')==0) strcpy(strb,modelsav); /* and analyze it */ |
| Line 3471 while((c=getc(ficpar))=='#' && c!= EOF){ | Line 3485 while((c=getc(ficpar))=='#' && c!= EOF){ |
| } /* end of loop + */ | } /* end of loop + */ |
| } /* end model */ | } /* end model */ |
| /*The number n of Vn is stored in Tvar. cptcovage =number of age covariate. Tage gives the position of age. cptcovprod= number of products. | |
| If model=V1+V1*age then Tvar[1]=1 Tvar[2]=1 cptcovage=1 Tage[1]=2 cptcovprod=0*/ | |
| /* printf("tvar1=%d tvar2=%d tvar3=%d cptcovage=%d Tage=%d",Tvar[1],Tvar[2],Tvar[3],cptcovage,Tage[1]); | /* printf("tvar1=%d tvar2=%d tvar3=%d cptcovage=%d Tage=%d",Tvar[1],Tvar[2],Tvar[3],cptcovage,Tage[1]); |
| printf("cptcovprod=%d ", cptcovprod); | printf("cptcovprod=%d ", cptcovprod); |
| fprintf(ficlog,"cptcovprod=%d ", cptcovprod); | fprintf(ficlog,"cptcovprod=%d ", cptcovprod); |
| scanf("%d ",i);*/ | |
| fclose(fic); | scanf("%d ",i); |
| fclose(fic);*/ | |
| /* if(mle==1){*/ | /* if(mle==1){*/ |
| if (weightopt != 1) { /* Maximisation without weights*/ | if (weightopt != 1) { /* Maximisation without weights*/ |
| Line 3546 while((c=getc(ficpar))=='#' && c!= EOF){ | Line 3564 while((c=getc(ficpar))=='#' && c!= EOF){ |
| } | } |
| } | } |
| printf("Total number of individuals= %d, Agemin = %.2f, Agemax= %.2f\n\n", imx, agemin, agemax); | printf("Total number of individuals= %d, Agemin = %.2f, Agemax= %.2f\n\n", imx, agemin, agemax); |
| fprintf(ficlog,"Total number of individuals= %d, Agemin = %.2f, Agemax= %.2f\n\n", imx, agemin, agemax); | fprintf(ficlog,"Total number of individuals= %d, Agemin = %.2f, Agemax= %.2f\n\n", imx, agemin, agemax); |
| free_vector(severity,1,maxwav); | free_vector(severity,1,maxwav); |
| free_imatrix(outcome,1,maxwav+1,1,n); | free_imatrix(outcome,1,maxwav+1,1,n); |
| Line 3566 printf("Total number of individuals= %d, | Line 3584 printf("Total number of individuals= %d, |
| /* Concatenates waves */ | /* Concatenates waves */ |
| concatwav(wav, dh, mw, s, agedc, agev, firstpass, lastpass, imx, nlstate, stepm); | concatwav(wav, dh, mw, s, agedc, agev, firstpass, lastpass, imx, nlstate, stepm); |
| /* Routine tricode is to calculate cptcoveff (real number of unique covariates) and to associate covariable number and modality */ | |
| Tcode=ivector(1,100); | Tcode=ivector(1,100); |
| nbcode=imatrix(0,NCOVMAX,0,NCOVMAX); | nbcode=imatrix(0,NCOVMAX,0,NCOVMAX); |
| ncodemax[1]=1; | ncodemax[1]=1; |
| if (cptcovn > 0) tricode(Tvar,nbcode,imx); | if (cptcovn > 0) tricode(Tvar,nbcode,imx); |
| codtab=imatrix(1,100,1,10); | codtab=imatrix(1,100,1,10); /* Cross tabulation to get the order of |
| the estimations*/ | |
| h=0; | h=0; |
| m=pow(2,cptcoveff); | m=pow(2,cptcoveff); |
| Line 3725 printf("Total number of individuals= %d, | Line 3745 printf("Total number of individuals= %d, |
| ungetc(c,ficpar); | ungetc(c,ficpar); |
| fscanf(ficpar,"begin-prev-date=%lf/%lf/%lf end-prev-date=%lf/%lf/%lf mov_average=%d\n",&jprev1, &mprev1,&anprev1,&jprev2, &mprev2,&anprev2,&mobilav); | fscanf(ficpar,"begin-prev-date=%lf/%lf/%lf end-prev-date=%lf/%lf/%lf mov_average=%d\n",&jprev1, &mprev1,&anprev1,&jprev2, &mprev2,&anprev2,&mobilav); |
| fprintf(ficparo,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,&mobilav); | fprintf(ficparo,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav); |
| fprintf(ficres,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,&mobilav); | fprintf(ficres,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav); |
| while((c=getc(ficpar))=='#' && c!= EOF){ | while((c=getc(ficpar))=='#' && c!= EOF){ |
| ungetc(c,ficpar); | ungetc(c,ficpar); |
| Line 3769 while((c=getc(ficpar))=='#' && c!= EOF){ | Line 3789 while((c=getc(ficpar))=='#' && c!= EOF){ |
| fprintf(ficparo,"popforecast=%d popfile=%s popfiledate=%.lf/%.lf/%.lf last-popfiledate=%.lf/%.lf/%.lf\n",popforecast,popfile,jpyram,mpyram,anpyram,jpyram1,mpyram1,anpyram1); | fprintf(ficparo,"popforecast=%d popfile=%s popfiledate=%.lf/%.lf/%.lf last-popfiledate=%.lf/%.lf/%.lf\n",popforecast,popfile,jpyram,mpyram,anpyram,jpyram1,mpyram1,anpyram1); |
| fprintf(ficres,"popforecast=%d popfile=%s popfiledate=%.lf/%.lf/%.lf last-popfiledate=%.lf/%.lf/%.lf\n",popforecast,popfile,jpyram,mpyram,anpyram,jpyram1,mpyram1,anpyram1); | fprintf(ficres,"popforecast=%d popfile=%s popfiledate=%.lf/%.lf/%.lf last-popfiledate=%.lf/%.lf/%.lf\n",popforecast,popfile,jpyram,mpyram,anpyram,jpyram1,mpyram1,anpyram1); |
| freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2,jprev1, mprev1,anprev1,jprev2, mprev2,anprev2); | freqsummary(fileres, agemin, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2,jprev1, mprev1,anprev1,jprev2, mprev2,anprev2); |
| /*------------ gnuplot -------------*/ | /*------------ gnuplot -------------*/ |
| strcpy(optionfilegnuplot,optionfilefiname); | strcpy(optionfilegnuplot,optionfilefiname); |
| strcat(optionfilegnuplot,".gp"); | strcat(optionfilegnuplot,".gp"); |
| Line 3974 Interval (in months) between two waves: | Line 3995 Interval (in months) between two waves: |
| } | } |
| printf("Computing Variance-covariance of DFLEs: file '%s' \n", fileresv); | printf("Computing Variance-covariance of DFLEs: file '%s' \n", fileresv); |
| fprintf(ficlog,"Computing Variance-covariance of DFLEs: file '%s' \n", fileresv); | fprintf(ficlog,"Computing Variance-covariance of DFLEs: file '%s' \n", fileresv); |
| calagedate=-1; | calagedate=-1; |
| prevalence(ageminpar, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2, calagedate); | prevalence(ageminpar, agemax, s, agev, nlstate, imx,Tvar,nbcode, ncodemax,mint,anint,dateprev1,dateprev2, calagedate); |
| if (mobilav!=0) { | if (mobilav!=0) { |
| mobaverage= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX); | mobaverage= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX); |
| if (movingaverage(probs, bage, fage, mobaverage,mobilav)!=0){ | if (movingaverage(probs, bage, fage, mobaverage,mobilav)!=0){ |