web/js/tests.js
// Transforms the output of an ANOVA test into HTML tables
Transforms the output of an ANOVA test into HTML tables
Transforms the output of an ANOVA test into HTML tables
function anova_table(data, test, alpha) {
    var salida = 
    "<div class=\"table-responsive\"><h2>Results</h2>\
        <a href=\"#modal_export\" data-toggle=\"modal\"><button class=\"btn btn-default\"><span class=\"glyphicon glyphicon-export\"></span>Export</button></a>\
		<table class=\"table table-hover table-striped\">\
			<caption>"+ $("input[value="+test+"]").parent().text() + " test (significance level of " + alpha + ")</caption>\
			<thead><tr><th>Statistic</th><th>p-value</th><th>Result</th></tr></thead>\
			<tbody><tr><td>" +data.statistic.toFixed(5)+ "</td><td>" +data.p_value.toFixed(5)+ "</td>";
    if(data.resultado == true)
        salida = salida + "<td>H0 is rejected</td></tr>";
    else
        salida = salida + "<td>H0 is accepted</td></tr>";
	salida = salida + "</tbody></table></div>";
    return salida;
}
function anova_table ( data , test , alpha ) { var salida = "<div class=\"table-responsive\"><h2>Results</h2>\
        <a href=\"#modal_export\" data-toggle=\"modal\"><button class=\"btn btn-default\"><span class=\"glyphicon glyphicon-export\"></span>Export</button></a>\
		<table class=\"table table-hover table-striped\">\
			<caption>" + $ ( "input[value=" + test + "]" ) . parent ( ) . text ( ) + " test (significance level of " + alpha + ")</caption>\
			<thead><tr><th>Statistic</th><th>p-value</th><th>Result</th></tr></thead>\
			<tbody><tr><td>" + data . statistic . toFixed ( 5 ) + "</td><td>" + data . p_value . toFixed ( 5 ) + "</td>" ; if ( data . resultado == true ) salida = salida + "<td>H0 is rejected</td></tr>" ; else salida = salida + "<td>H0 is accepted</td></tr>" ; salida = salida + "</tbody></table></div>" ; return salida ; }
Transforms the output of an ANOVA test into HTML tables
Transforms the output of an ANOVA test into HTML tables