logit(LaplacesDemon)
logit()所属R语言包:LaplacesDemon
The logit and inverse-logit functions
Logit和反罗吉特功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The logit and inverse-logit (also called the logistic function) are provided.
Logit和逆罗吉特(也称为MF函数)中所提供的。
用法----------Usage----------
invlogit(x)
logit(p)
参数----------Arguments----------
参数:x
This object contains real values that will be transformed to the interval [0,1].
这个对象包含了真正的价值,将转化为区间[0,1]。
参数:p
This object contains of probabilities p in the interval [0,1] that will be transformed to the real line.
此对象包含在区间[0,1]的概率p将被转化为实线。
Details
详细信息----------Details----------
The logit function is the inverse of the sigmoid or logistic function, and transforms a continuous value (usually probability p) in the interval [0,1] to the real line (where it is usually the logarithm of the odds). The logit function is log(p / (1 - p)).
功能是logit逆的乙状结肠或后勤功能,并且将连续值(通常是概率p)在区间[0,1]上的实线(通常是对数赔率)。 logit功能是log(p / (1 - p))。
The invlogit function (called either the inverse logit or the logistic function) transforms a real number (usually the logarithm of the odds) to a value (usually probability p) in the interval [0,1]. The invlogit function is 1 / (1 + exp(-x)).
invlogit功能(称为逆Logit或MF功能)将一个实数(通常是对数的赔率)的值(通常是概率p)在区间[0,1] 。 invlogit功能是1 / (1 + exp(-x))。
If p is a probability, then p/(1-p) is the corresponding odds, while the logit of p is the logarithm of the odds. The difference between the logits of two probabilities is the logarithm of the odds ratio. The derivative of probability p in a logistic function (such as invlogit) is: (d / dx) = p * (1 - p).
如果p是一个概率,然后p/(1-p)是相应的赔率,,而logit p是对数的赔率。之间的差异的两个概率logits的比值比的对数。衍生工具的概率p在逻辑功能(如invlogit):(d / dx) = p * (1 - p)。
In the LaplacesDemon package, it is common to re-parameterize a model so that a parameter that should be in an interval can be updated from the real line by using the logit and invlogit functions, though the interval function provides an alternative. For example, consider a parameter theta that must be in the interval [0,1]. The algorithms in LaplaceApproximation and LaplacesDemon are unaware of the desired interval, and may attempt theta outside of this interval. One solution is to have the algorithms update logit(theta) rather than theta. After logit(theta) is manipulated by the algorithm, it is transformed via invlogit(theta) in the model specification function, where theta in [0,1].
在LaplacesDemon包,它是常见的重新参数化的模型,所以,应该是在一个间隔中的参数,该参数可以通过使用logit和invlogit函数从实线更新,尽管 interval函数提供了一种替代方法。例如,考虑一个参数theta,必须是在区间[0,1]。中的算法LaplaceApproximation和LaplacesDemon不知道所需的时间间隔,并可能会尝试theta这个区间之外。解决办法之一是算法更新logit(theta)而不是theta。在logit(theta)进行操作的算法,它通过转化invlogit(theta)模型中的规范功能,其中theta in [0,1]。
值----------Value----------
invlogit returns probability p, and logit returns x.
invlogit回报的概率p和logit回报x。
参见----------See Also----------
interval, LaplaceApproximation, LaplacesDemon, plogis, and qlogis.
interval,LaplaceApproximation,LaplacesDemon,plogis和qlogis。
实例----------Examples----------
library(LaplacesDemon)
x <- -5:5
p <- invlogit(x)
x <- logit(p)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|