PHP Classes

SChemA: Perform statistical operations for chemistry

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 141 All time: 9,202 This week: 560Up
Version License PHP version Categories
schema 1.0.0GNU General Publi...5PHP 5, Statistics, Math
Description 

Author

This class can perform statistical operations for chemistry.

It can take a set of values and perform several types of statistical operations. Currently it can:

- Average
- Standard deviation
- Calculate given percentile
- Scaled median absolute deviation
- Relative standard deviation
- Relative standard deviation (RSD) with robust estimators
- Percentage of root mean square (RMS) for a reference value (CRM, recovery,...).
- F and t distributions
- Relative uncertainty

Picture of Jose Manuel
  Performance   Level  
Name: Jose Manuel <contact>
Classes: 3 packages by
Country: Spain Spain
Innovation award
Innovation award
Nominee: 2x

Example

<?php
require('functions/SchemA.php');
echo(
'Result for 5 spike of 1.5 mg/l with ammonium in wastewater');
echo(
'<br>');
$valores=array(1.4,1.51,1.42,1.96,1.36);
$estadisticaresultados= new SchemA();
$media=$estadisticaresultados->average($valores);
$sd=$estadisticaresultados->sd($valores);
$rsd=$estadisticaresultados->rsd($valores);
$perc=$estadisticaresultados->mypercentile($valores,50);
$mad=$estadisticaresultados->mad($valores);
$robustrsd=$estadisticaresultados->rsdrob($valores);
$rms=$estadisticaresultados->rms($valores,1.5);
$tcalc=$estadisticaresultados->getTcalc($valores,1.5);
$tobtenida=$estadisticaresultados->getInverseStudentT(95,$valores);
$incert=$estadisticaresultados->uncertainty($valores,1.5);
$sig=$estadisticaresultados->sigFig(10.63569,2);
print_r($valores);
echo(
'<br>');
echo(
$media.'/<-Average/ <br>');
echo(
$sd.'/<-Standard desviation/<br>');
echo(
$rsd.'/<-RSD/<br>');
echo(
$perc.'/<-Percentile 50/<br>');
echo(
$mad.'/<-MAD/<br>');
echo(
$robustrsd.'/<-Robust RSD/<br>');
echo(
$rms.'/<-RMS/<br>');
echo(
$tcalc.'/<-tcalc/<br>');
echo(
$tobtenida.'/<-tobte/<br>');
echo(
$incert.'/<-%Uncert/<br>');
echo(
$sig.'/<-significant figures transformation/<br>');
   
?>


  Files folder image Files (2)  
File Role Description
Files folder imagefunctions (1 file)
Plain text file exampleSChemAclass.php Example exampleSChemAclass

  Files folder image Files (2)  /  functions  
File Role Description
  Plain text file SchemA.php Class Statistical for Chemist

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:141
This week:0
All time:9,202
This week:560Up