Commit 83bc54fa authored by julien veyssier's avatar julien veyssier
Browse files

add jackknife R2 to jackknife plot title, add comment before jackknife question

parent c07d9158
...@@ -50,7 +50,7 @@ data file "EXAMPLE.CLI" : ...@@ -50,7 +50,7 @@ data file "EXAMPLE.CLI" :
* Age at the end of environmental influence __1__ * Age at the end of environmental influence __1__
* Is this an acceptable model?__Yes__ * Is this an acceptable model?__Yes__
* Are there a good fit and no trend or strong autocorrelation in residuals?__Yes__ * Are there a good fit and no trend or strong autocorrelation in residuals?__Yes__
* Are there reasonable jackknife coefficient R2 (>65% recommanded) no extreme yearly coefficient and acceptable MSY graph __Yes__ * Are there reasonable jackknife coefficient R2 (>65% recommended) no extreme yearly coefficient and acceptable MSY graph __Yes__
## TO DO ## TO DO
......
...@@ -83,7 +83,7 @@ public class Global { ...@@ -83,7 +83,7 @@ public class Global {
static int cpue_sous_sur_production; // May the stock present large fluctuations in CPUE when overexploited static int cpue_sous_sur_production; // May the stock present large fluctuations in CPUE when overexploited
static double jackknife; // Reasonable jackknife coefficient R2 (>65% recommanded), no extreme yearly coefficient, and acceptable MSY graph static double jackknife; // Reasonable jackknife coefficient R2 (>65% recommended), no extreme yearly coefficient, and acceptable MSY graph
static boolean test_jackknife; static boolean test_jackknife;
static int coeff_determination_instable; static int coeff_determination_instable;
/** /**
...@@ -225,7 +225,7 @@ public class Global { ...@@ -225,7 +225,7 @@ public class Global {
cpue_sous_sur_production = -1; // May the stock present large fluctuations in CPUE when overexploited cpue_sous_sur_production = -1; // May the stock present large fluctuations in CPUE when overexploited
jackknife = 0.0d; // Reasonable jackknife coefficient R2 (>65% recommanded), no extreme yearly coefficient, and acceptable MSY graph jackknife = 0.0d; // Reasonable jackknife coefficient R2 (>65% recommended), no extreme yearly coefficient, and acceptable MSY graph
test_jackknife = false; test_jackknife = false;
coeff_determination_instable = -1; coeff_determination_instable = -1;
/** /**
......
...@@ -383,6 +383,7 @@ public static boolean isTrue(){ ...@@ -383,6 +383,7 @@ public static boolean isTrue(){
} }
else else
commentaireEnCours="The Student's test on jackknife regression coefficients is acceptable"; commentaireEnCours="The Student's test on jackknife regression coefficients is acceptable";
commentaireEnCours=commentaireEnCours+"\n\nDue to usual autocorrelation in time series and non independance between CPUE and E, conventional statistics are usually provide too optimistic results";
break; break;
case 1: case 1:
result=( Global.coeff_determination_instable!=1); result=( Global.coeff_determination_instable!=1);
...@@ -410,6 +411,7 @@ public static boolean isTrue(){ ...@@ -410,6 +411,7 @@ public static boolean isTrue(){
} }
if(result && commentaireEnCours.equals("")) if(result && commentaireEnCours.equals(""))
commentaireEnCours=(String)htComment.get(Integer.toString(numEnCours)); commentaireEnCours=(String)htComment.get(Integer.toString(numEnCours));
System.out.println("LE commentaire est "+commentaireEnCours);
System.out.println("On teste " + numEnCours + " elle est "+ result ); System.out.println("On teste " + numEnCours + " elle est "+ result );
return result; return result;
} }
......
...@@ -357,6 +357,7 @@ public static void valide_modele() ...@@ -357,6 +357,7 @@ public static void valide_modele()
for(i=0;i<nbre_par;i++) { for(i=0;i<nbre_par;i++) {
if ( Math.abs(par_init[i]/ecart_pseudo[i]) < 2.00) Global.test_jackknife=false; if ( Math.abs(par_init[i]/ecart_pseudo[i]) < 2.00) Global.test_jackknife=false;
} }
// TODO add fisher test
/****************************************************************************/ /****************************************************************************/
r_jk = (1 - (sdc_jk/var_tot)); r_jk = (1 - (sdc_jk/var_tot));
if(r_tot<0.0) r_tot = 0.0; if(r_tot<0.0) r_tot = 0.0;
...@@ -457,14 +458,14 @@ for(int i=0;i<nbre_par;i++){ ...@@ -457,14 +458,14 @@ for(int i=0;i<nbre_par;i++){
trjk=new double[nim]; trjk=new double[nim];
for(int i=0;i<nim;i++) for(int i=0;i<nim;i++)
trjk[i] = 10000*jkn[i][0]/r_tot; trjk[i] = 10000*jkn[i][0]/r_tot;
DecimalFormat nf = new DecimalFormat("0.00");
PlotSerie ps= new PlotSerie("Years",etiq,"",trjk); PlotSerie ps= new PlotSerie("Years",etiq,"",trjk);
ps.setFigure(3); ps.setFigure(3);
ps.setCouleur(Color.blue); ps.setCouleur(Color.blue);
Global.jackknifePlot[nbre_par]=new PlotHisto(); Global.jackknifePlot[nbre_par]=new PlotHisto();
Global.jackknifePlot[nbre_par].setValeurs(ps); Global.jackknifePlot[nbre_par].setValeurs(ps);
Global.jackknifePlot[nbre_par].setValeurs(ps100); Global.jackknifePlot[nbre_par].setValeurs(ps100);
Global.jackknifePlot[nbre_par].setTitreGraphique(Global.titreG[21]); Global.jackknifePlot[nbre_par].setTitreGraphique(Global.titreG[21]+" (Jackknife R2 = "+nf.format(Global.jackknife)+")");
Global.jackknifePlot[nbre_par].setTitreX(Global.titreSx[21]); Global.jackknifePlot[nbre_par].setTitreX(Global.titreSx[21]);
Global.jackknifePlot[nbre_par].setTitreY(Global.titreSy[21]); Global.jackknifePlot[nbre_par].setTitreY(Global.titreSy[21]);
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
97;98;-3;0;2;good_results;Is this an acceptable model?; acceptab.hlp ; 97;98;-3;0;2;good_results;Is this an acceptable model?; acceptab.hlp ;
98;99;-3;15;3;trend_residuals;Are there a good fit and no trend or strong autocorrelation in residuals?; fitresid.hlp ; 98;99;-3;15;3;trend_residuals;Are there a good fit and no trend or strong autocorrelation in residuals?; fitresid.hlp ;
99;104;100;2;2;;;; 99;104;100;2;2;;;;
100;101;-3;1;3;jackknife;Is there a reasonable jackknife coefficient R2 (>65% recommanded) no extreme yearly regression coefficients, an acceptable F test (p<0.01 recommended) and acceptable MSY graph ?; valide.hlp ;;;;;;;;;;;; 100;101;-3;1;3;jackknife;Is there a reasonable jackknife coefficient R2 (>65% recommended) no extreme yearly regression coefficients, an acceptable F test (p<0.01 recommended) and acceptable MSY graph ?; valide.hlp ;;;;;;;;;;;;
101;-4;-4;3;3;;;; 101;-4;-4;3;3;;;;
102;-1;47;54;2 102;-1;47;54;2
103;46;102;55;2 103;46;102;55;2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment