Commit 145925e2 authored by pfreon's avatar pfreon
Browse files

Addition of p-values in the Spearman's rank correlation matrix & cosmetic changes

parent e2432e37
Years;Production;Effort;Environment
1969; 332.4; 146.5; 4.40
1970; 285.5; 127.6; 4.32
1971; 306.7; 130.34; 4.70
2006; 537.2; 208.06; 5.63
2007; 599.4; 243.66; 5.53
2008; 692.5; 386.44; 5.76
2009; 612.9; 320.22; 5.66
2010; 809.4; 413.17; 5.79
1977; 776.0; 430.39; 5.72
2002; 332.4; 146.5; 4.40
2003; 285.5; 127.6; 4.32
2004; 306.7; 130.34; 4.70
2005; 537.2; 208.06; 5.63
2006; 599.4; 243.66; 5.53
2007; 692.5; 386.44; 5.76
2008; 612.9; 320.22; 5.66
2009; 809.4; 413.17; 5.79
2010; 776.0; 430.39; 5.72
2011; 764.0; 509.67; 5.21
2012; 694.7; 461.9; 4.68
2013; 702.4; 398.41; 4.98
......
......@@ -30,7 +30,7 @@ public class Data {
public static double[][] stat = new double[10][4];
private static Object[][] dataTable;
private static Object[][] dataCorrelation;
public static void readFile(String file)
{
dataTable = null;
......@@ -254,7 +254,7 @@ public class Data {
vbar[i] += data[i + decalmax - d][3] * vcoeff[d];
}
pue[i] = yexp[i] / data[i + decalmax][2];
System.out.println(data[i+decalmax][0]+"*"+yexp[i]+"*"+v[i]+"*"+f[i]+"*"+vbar[i]+"*"+ pue[i]);
//System.out.println(data[i+decalmax][0]+"*"+yexp[i]+"*"+v[i]+"*"+f[i]+"*"+vbar[i]+"*"+ pue[i]);
}
makePlot(true);
......@@ -273,7 +273,7 @@ public class Data {
{ begining = agerec;
ending = agerec + nbexploit -1;
}
System.out.println(nbexploit+"****"+agerec+ "**********" +begining+"******"+ending);
//System.out.println(nbexploit+"****"+agerec+ "**********" +begining+"******"+ending);
/*int nbexploit=Integer.parseInt((String)Global.htVar.get("nb_classes_exploitees"));
int agerec=Integer.parseInt((String)Global.htVar.get("recruitment_age"));
......@@ -679,5 +679,55 @@ public class Data {
dataCorrelation[4][1] = nf.format(Stat1.rho(v, yexp));
dataCorrelation[4][2] = nf.format(Stat1.rho(v, pue));
dataCorrelation[4][3] = nf.format(Stat1.rho(v, f));
/***** t-test on r Spearman: t = abs(r*sqr(((n-2)/(1-(r1^2)))) */
//System.out.println("t C CPUE = " + Math.abs(Stat1.rho(yexp, pue))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(yexp, pue),2))));
if (Math.abs(Stat1.rho(yexp, pue))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(yexp, pue),2))) < Global.TableStudent[nbData-2][0])
dataCorrelation[1][2] = ">0.5";
else if (Math.abs(Stat1.rho(yexp, pue))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(yexp, pue),2))) < Global.TableStudent[nbData-2][1])
dataCorrelation[1][2] = "<0.5";
else
dataCorrelation[1][2] = "<0.01";
//System.out.println("t f C = " + Math.abs(Stat1.rho(f, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(f, yexp),2))));
if (Math.abs(Stat1.rho(f, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(f, yexp),2))) < Global.TableStudent[nbData-2][0])
dataCorrelation[1][3] = ">0.5";
else if (Math.abs(Stat1.rho(f, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(f, yexp),2))) < Global.TableStudent[nbData-2][1])
dataCorrelation[1][3] = "<0.5";
else
dataCorrelation[1][3] = "<0.01";
//System.out.println("t f CPUE = " + Math.abs(Stat1.rho(f, pue))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(f, pue),2))));
if (Math.abs(Stat1.rho(f, pue))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(f, pue),2))) < Global.TableStudent[nbData-2][0])
dataCorrelation[2][3] = ">0.5";
else if (Math.abs(Stat1.rho(f, pue))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(f, pue),2))) < Global.TableStudent[nbData-2][1])
dataCorrelation[2][3] = "<0.5";
else
dataCorrelation[2][3] = "<0.01";
//System.out.println("t V C = " + Math.abs(Stat1.rho(v, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, yexp),2))));
if (Math.abs(Stat1.rho(v, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, yexp),2))) < Global.TableStudent[nbData-2][0])
dataCorrelation[1][4] = ">0.5";
else if (Math.abs(Stat1.rho(v, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, yexp),2))) < Global.TableStudent[nbData-2][1])
dataCorrelation[1][4] = "<0.5";
else
dataCorrelation[1][4] = "<0.01";
//System.out.println("t V CPUE = " + Math.abs(Stat1.rho(v, f))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, f),2))));
if (Math.abs(Stat1.rho(v, f))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, f),2))) < Global.TableStudent[nbData-2][0])
dataCorrelation[2][4] = ">0.5";
else if (Math.abs(Stat1.rho(v, f))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, f),2))) < Global.TableStudent[nbData-2][1])
dataCorrelation[2][4] = "<0.5";
else
dataCorrelation[2][4] = "<0.01";
//System.out.println("t V C = " + Math.abs(Stat1.rho(v, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, yexp),2))));
if (Math.abs(Stat1.rho(v, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, yexp),2))) < Global.TableStudent[nbData-2][0])
dataCorrelation[3][4] = ">0.5";
else if (Math.abs(Stat1.rho(v, yexp))*Math.sqrt((nbData-2)/(1-Math.pow(Stat1.rho(v, yexp),2))) < Global.TableStudent[nbData-2][1])
dataCorrelation[3][4] = "<0.5";
else
dataCorrelation[3][4] = "<0.01";
}
}
0;-1;103;41;1;;;;;;;;;;;;;;
103;108;1;30;1;;;;;;;;;;;;;;
108;1;1;-1;1;double_click;Do you wish to see again the special warning about the double click use in CLIMPROD next time you will open the software?; click.hlp;;;;;;;;;;;;;
108;1;1;-1;1;double_click;Do you wish to see again the special warning about the double click use in CLIMPROD next time you will open the software?; click.hlp;;;;;;;;;;;
1;-1;2;47;1;;;;;;;;;;;;;;
2;-1;3;42;1;changement_exploitation; Have there been changes in the fishing pattern during the period (effort allocation quota mesh-size ...)?; changes.hlp ;;;;;;;;;;;
3;4;-1;43;1;unite_standardisee;Is the fishing effort unit standardized and is the CPUE proportional to abundance?; standard.hlp ;;;;;;;;;;;
......
......@@ -6,4 +6,8 @@ seems to be decreasing. If not, that means that fishing effort is not a key
variable for explaining CPUE variability, except if E is not independent
from environment V.
The value of the Spearman's rank correlation coefficient between E and CPUE
and its associated p-value, as shown in the bottom table of the main frame
can help you to make a decision (not shown for E vs CPUE residuals).
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