logit: logit transformation

View source: R/logit.R

logitR Documentation

logit transformation

Description

Applies the logit transformation to one or more proportions. The logit represents the log odds of a "hit" or a 1–that is, log(p(hit)/(1-p(hit))– and is a better transformation to proportions for approximating the normal distribution than is the arcsine transformation.

Usage

logit(x)

Arguments

x

proportion(s) to which the logit transformation should be applied.

Details

Note that the logit is also a link function used in logistic regression to model binomial outcomes. If the binomial outcomes are available–i.e., observations at the level of individual "hits" or "misses" (0 or 1s), rather than a proportion aggregated over multiple observations–then logistic regression may be directly applied to those data, and applying any sort of transformation to the proportions is unnecessary.

The logit is undefined when p(hit) = 1 or p(hit) = 0; in addition, when p(hit) is close to 0 or 1, the logit is defined but not particularly stable. In these cases, the empirical logit may be useful instead.

Value

numeric vector with the logit-transformed proportions

References

Jaeger, T. F. (2008). Categorical data analysis: Away from ANOVAs (transformation or not) and towards logit mixed models. Journal of Memory and Language, 59, 434-446.

See Also

logittoprob to transform logits back into probabilities.

probdifftologit to transform a difference o probabilities into logits.

Examples

mydata = data.frame(Accuracy.Proportion = c(0.5,0.75,0.90,0.2))
mydata$Accuracy.Logit <- logit(mydata$Accuracy.Proportion)

sfraundorf/psycholing documentation built on April 23, 2022, 2:50 a.m.