logistic_regression​_metrics

Performs logistic regression using glmfit with one or multiple predictors. Retrieves different metrics of interest.
142 Downloads
Updated 15 Feb 2021

View License

This function performs logistic regression using glmfit with one or multiple predictors. Removes outliers (abs(zscore(res))>3) and performs the regression again (if you do not want this feature, comment those rows).

Returns stats (returned directly from the glmfit function), odds ratio, 95% confidence intervals, confusion matrix, proportion of correctly predicted outcomes, sensitivity, specificity, and precision.

All output metrics are in accordance with results attained in Jasp software.

Cite As

Madalena Esteves (2021). logistic_regression_metrics (https://github.com/madalenaesteves/shared_matlab/blob/main/logistic_regression_metrics.m).

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.1

15/02/2021 - correction of the database used for metrics calculation (now without outliers)

1.0.0