pubSTAT

A MATLAB toolset for the publication and documentation of statistical results.
5 Downloads
Updated 7 Dec 2022
pubSTAT: publication of Statitics
pubSTAT is aimed publication of statistical results in MATLAB. When doing statistical analyze results are often copy pasted manually into Word or other editors for publication. However this might easily introduce errors and is time consuming. Therefore, I have developed pubSTAT, that is a tool for simple statical analysis where the results are stored in tables. These tables can ealsy be converted to HTML tables using the function plotTable.m and the publish function in MATLAB.
The current version includes 3 types of statistical tables:
  • summeryTable: For basic statistical summery
  • aucTables: For classification performance
  • corrTables: For correlation analyze
When a table is constructed, it can be included in a script which can be published using MATLAB's publish function. Central to convert the tables into HTML tables are the function plottable.m, that when using MATLAB’s publishing function converts MATLAB tables into HTML tables.
Get started
The basic idea is to make scripts that does the statistical analysis and then published these using MATLAB publish.
Example 1
So, if you store your data in a table called "tbl" and you want to get summery statics, make a script called 'yourScript.m' including the code below:
% make a table with age and Sex from 5 subjects
tbl=table([20 33 45 23 57]',categorical({'Female','Male','Female','Male','Male'})','VariableNames',{'Age','Sex'});
% do summary analysis
result_table=summeryTable(tbl);
% print the table
plotTable(result_table)
Then publish the script MATLAB publishing function
publish('yourScript.m')
The resulting HTML file is HTML\yourScript.html
Example 2
Publish the file 'exampleReport.m', using:
publish('exampleReport.m','showCode',true)
The resulting HTML file is HTML\exampleReport.html
'exampleReport.m' includes use of all the differente statistical tables using the MATLAB patient dataset.

Cite As

Samuel Schmidt (2024). pubSTAT (https://github.com/Samuelemil/pubSTAT/releases/tag/v1.00), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with R2019b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.00

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.