logistic_regression_metrics
Version 1.0.1 (2.54 KB) by
Madalena Esteves
Performs logistic regression using glmfit with one or multiple predictors. Retrieves different metrics of interest.
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 LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
