差分

ナビゲーションに移動 検索に移動
782 バイト追加 、 2023年2月4日 (土) 17:58
===How to convert coefficient of binary logistic regressoin to odds ratio===
About a binary logistic regression formula,
:<math>
\begin{align}& \log Y = \\& \log \left ( \frac{p}{1-p} \right ) = a + b_1X_1 + b_2X_2 + b_3X_3 + \cdots\end{align}
</math>
adding 1 to <math>X_1</math> makes probablity <math>p\prime</math>as,\begin{array}{lcl}:<math>\log Y & = & a + b_1X_1 + b_2X_2 + b_3X_3 + \cdots \\\log left ( \frac{p\prime}{1-p\prime} & \right ) = & a + b_1X_1 b_1(X_1 + 1) + b_2X_2 + b_3X_3 + \cdots \\\end{array}
</math>
 
Subtraction of above two equations makes,
:<math>
\begin{align}
\log \left ( \frac{p\prime}{1-p\prime} \right ) - \log \left ( \frac{p}{1-p} \right ) & = b_1(X_1 + 1) - b_1X_1 \\
& = b_1 \\
\Leftrightarrow \frac {\left ( \dfrac{p\prime}{1-p\prime} \right )}{ \left ( \dfrac{p}{1-p} \right ) } & = e^{b_1}
\end{align}
</math>
 
Here <math>\Leftrightarrow \frac {\left ( \dfrac{p\prime}{1-p\prime} \right )}{ \left ( \dfrac{p}{1-p} \right ) }</math> is the odds ratio of the probablity <math>p\prime</math> after 1 is added to <math>X_1</math> to the probability <math>p</math>, so <math>e\{b_1}</math> is the conversion of coefficient <math>b_1</math> to obtain the odds ratio when variable <math>X_1</math> gains 1.
==Generalized linear model==

案内メニュー