logit function to transform proportional data for regression

This function is used to transform proportional data between 0-1 to real values for statistical analysis such as regression
53 téléchargements
Mise à jour 16 août 2023

Afficher la licence

This function logit.m is used to transform proportional data between 0-1 to for statistical analysis such as regressions. The logit transform of x is defined as follows:
logit(x) = log(x/(1-x))
This function transforms the proportions between 0-1 into real numbers between -Inf and +Inf for use in regression analysis
This function uses an epsilon method to truncate the proportion data if there are occurrences of 0 and/or 1 values where epsilon is half of the lowest non-zero value of x (if there are 0 values but not 1 values) or epsilon is half of the difference between 1 and the highest non-one value of x (if there are 1 values but not 0 values) or the min of half of the lowest non-zero value of x and half of the difference between 1 and the highest non-one value of x (if there are 0 and 1 values but not 0 values) and epsilon is substituted for the zero values and 1-epsilon is substituted for the 1 values to truncate and maintain symmetry and shape of the logit distribution.
This function uses the following two other custom matlab functions by Jan Gläscher that are also in the mathworks file exchange repository named "NaN Suite" (available at https://www.mathworks.com/matlabcentral/fileexchange/6837-nan-suite):
- nanmin2 find the minimum value from a vector or array that may contain nan values
- nanmax2 find the maximum value from a vector or array that may contain nan values

Citation pour cette source

Gregory Pelletier (2024). logit function to transform proportional data for regression (https://www.mathworks.com/matlabcentral/fileexchange/131509-logit-function-to-transform-proportional-data-for-regression), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2023a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Tags Ajouter des tags

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.1

epsilon logic update

1.0.0