diff --git a/_subfiles/exponential-families/_exm-uniform-not-exponential-family.qmd b/_subfiles/exponential-families/_exm-uniform-not-exponential-family.qmd index 285fd8344a..f868c4154c 100644 --- a/_subfiles/exponential-families/_exm-uniform-not-exponential-family.qmd +++ b/_subfiles/exponential-families/_exm-uniform-not-exponential-family.qmd @@ -1,5 +1,5 @@ :::{#exm-uniform-not-exponential-family} -#### The uniform distribution on $[0, \highend]$ is not an exponential family +#### The uniform distribution on ${[0, \highend]}$ is not an exponential family diff --git a/_subfiles/logistic-inference/_cor-logistic-odds-ratio.qmd b/_subfiles/logistic-inference/_cor-logistic-odds-ratio.qmd index 5402fee2f6..b9617fc216 100644 --- a/_subfiles/logistic-inference/_cor-logistic-odds-ratio.qmd +++ b/_subfiles/logistic-inference/_cor-logistic-odds-ratio.qmd @@ -12,7 +12,7 @@ $$ ::: proof -Let $\diff \vpredvar \eqdef \vpredvar' - \vpredvar$, so that $\vpredvar' = \vpredvar + \diff \vpredvar$, and the first entry of $\diff \vpredvar$ is $1 - 1 = 0$. +Let $\diffvpredvar \eqdef \vpredvar' - \vpredvar$, so that $\vpredvar' = \vpredvar + \diffvpredvar$, and the first entry of $\diffvpredvar$ is $1 - 1 = 0$. $$ \ba @@ -20,10 +20,10 @@ $$ &= \frac{\oddsf{\vpredvar'}}{\oddsf{\vpredvar}} && \text{(definition of the odds ratio)} \\ -&= \frac{\oddsf{\vpredvar} \, \oddsfactorf{\diff \vpredvar}}{\oddsf{\vpredvar}} +&= \frac{\oddsf{\vpredvar} \, \oddsfactorf{\diffvpredvar}}{\oddsf{\vpredvar}} && \text{(odds multiplier theorem)} \\ -&= \oddsfactorf{\diff \vpredvar}. +&= \oddsfactorf{\diffvpredvar}. && \text{(divide numerator and denominator by } \oddsf{\vpredvar} > 0 \text{)} \ea $$ diff --git a/_subfiles/logistic-inference/_def-odds-multiplier.qmd b/_subfiles/logistic-inference/_def-odds-multiplier.qmd index 1bf3b1671c..68329c9a85 100644 --- a/_subfiles/logistic-inference/_def-odds-multiplier.qmd +++ b/_subfiles/logistic-inference/_def-odds-multiplier.qmd @@ -4,12 +4,12 @@ Let: - $\vcoef$ be the coefficient vector of a [logistic regression model](#def-logistic-regression). -- $\diff \vpredvar$ be a change in the [predictor](https://morrison-lab.github.io/pds/expectation.html#def-input) vector, whose first entry is $0$, because every predictor vector has first entry $1$. +- $\diffvpredvar$ be a change in the [predictor](https://morrison-lab.github.io/pds/expectation.html#def-input) vector, whose first entry is $0$, because every predictor vector has first entry $1$. -The **odds multiplier** of $\diff \vpredvar$ is the [exponential](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-exponential-function) of the [dot product](https://morrison-lab.github.io/mds/linear-algebra-vectors.html#def-dot-product) of $\vcoef$ with $\diff \vpredvar$: +The **odds multiplier** of $\diffvpredvar$ is the [exponential](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-exponential-function) of the [dot product](https://morrison-lab.github.io/mds/linear-algebra-vectors.html#def-dot-product) of $\vcoef$ with $\diffvpredvar$: $$ -\oddsfactorf{\diff \vpredvar} \eqdef \e{\dprod{\vcoef}{\diff \vpredvar}}. +\oddsfactorf{\diffvpredvar} \eqdef \e{\dprod{\vcoef}{\diffvpredvar}}. $$ ::: diff --git a/_subfiles/logistic-inference/_exm-not-odds-multiplier.qmd b/_subfiles/logistic-inference/_exm-not-odds-multiplier.qmd index 61e57381e9..b207f2cfe8 100644 --- a/_subfiles/logistic-inference/_exm-not-odds-multiplier.qmd +++ b/_subfiles/logistic-inference/_exm-not-odds-multiplier.qmd @@ -4,7 +4,7 @@ In the [six-patient trial](#exm-logistic-regression), the [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) of recovery under the [maximum likelihood fit](intro-MLEs.qmd#def-mle) is $2/3$ in the treatment group and $1/3$ in the control group. The code computes the [risk ratio](categorical-tests.qmd#def-risk-ratio) of treatment against control, -and shows beside it the [odds multiplier](#def-odds-multiplier) of the change $\diff \vpredvar = \tp{\paren{0, 2}}$ from @exm-odds-multiplier. +and shows beside it the [odds multiplier](#def-odds-multiplier) of the change $\diffvpredvar = \tp{\paren{0, 2}}$ from @exm-odds-multiplier. ```{r} #| code-fold: false diff --git a/_subfiles/logistic-inference/_exm-odds-multiplier.qmd b/_subfiles/logistic-inference/_exm-odds-multiplier.qmd index d092591c91..f06563c887 100644 --- a/_subfiles/logistic-inference/_exm-odds-multiplier.qmd +++ b/_subfiles/logistic-inference/_exm-odds-multiplier.qmd @@ -2,7 +2,7 @@ #### The odds multiplier of moving from control to treatment -In the [six-patient trial](#exm-logistic-regression), moving a patient from the control group ($\predvar = -1$) to the treatment group ($\predvar = +1$) changes the predictor vector by $\diff \vpredvar = \tp{\paren{0, 2}}$. +In the [six-patient trial](#exm-logistic-regression), moving a patient from the control group ($\predvar = -1$) to the treatment group ($\predvar = +1$) changes the predictor vector by $\diffvpredvar = \tp{\paren{0, 2}}$. The code computes the [odds multiplier](#def-odds-multiplier) of that change under the [maximum likelihood fit](intro-MLEs.qmd#def-mle). ```{r} diff --git a/_subfiles/logistic-inference/_exm-thm-odds-multiplier.qmd b/_subfiles/logistic-inference/_exm-thm-odds-multiplier.qmd index c92b11e3d8..2bae40c810 100644 --- a/_subfiles/logistic-inference/_exm-thm-odds-multiplier.qmd +++ b/_subfiles/logistic-inference/_exm-thm-odds-multiplier.qmd @@ -2,9 +2,9 @@ #### The treated odds from the control odds -In the [six-patient trial](#exm-logistic-regression), take $\vpredvar = \tp{\paren{1, -1}}$, a control patient, and $\diff \vpredvar = \tp{\paren{0, 2}}$, so that $\vpredvar' = \tp{\paren{1, 1}}$ is a treated patient. +In the [six-patient trial](#exm-logistic-regression), take $\vpredvar = \tp{\paren{1, -1}}$, a control patient, and $\diffvpredvar = \tp{\paren{0, 2}}$, so that $\vpredvar' = \tp{\paren{1, 1}}$ is a treated patient. Under the [maximum likelihood fit](intro-MLEs.qmd#def-mle), the code computes the [odds](https://morrison-lab.github.io/pds/probability-basics.html#def-odds) of recovery at both [predictor](https://morrison-lab.github.io/pds/expectation.html#def-input) vectors, -and the control odds times the [odds multiplier](#def-odds-multiplier) of $\diff \vpredvar$. +and the control odds times the [odds multiplier](#def-odds-multiplier) of $\diffvpredvar$. ```{r} #| code-fold: false diff --git a/_subfiles/logistic-inference/_thm-odds-multiplier.qmd b/_subfiles/logistic-inference/_thm-odds-multiplier.qmd index 7e04de776f..c4d786082c 100644 --- a/_subfiles/logistic-inference/_thm-odds-multiplier.qmd +++ b/_subfiles/logistic-inference/_thm-odds-multiplier.qmd @@ -4,13 +4,13 @@ Let: - $\vpredvar$ be a [predictor](https://morrison-lab.github.io/pds/expectation.html#def-input) vector in the [logistic regression model](#def-logistic-regression) of @eq-logistic-model. -- $\diff \vpredvar$ be a change in the predictor vector, with first entry $0$. -- $\vpredvar' \eqdef \vpredvar + \diff \vpredvar$. +- $\diffvpredvar$ be a change in the predictor vector, with first entry $0$. +- $\vpredvar' \eqdef \vpredvar + \diffvpredvar$. -Then the [odds](https://morrison-lab.github.io/pds/probability-basics.html#def-odds) of $\Outvar = 1$ at $\vpredvar'$ are the odds at $\vpredvar$ times the [odds multiplier](#def-odds-multiplier) of $\diff \vpredvar$: +Then the [odds](https://morrison-lab.github.io/pds/probability-basics.html#def-odds) of $\Outvar = 1$ at $\vpredvar'$ are the odds at $\vpredvar$ times the [odds multiplier](#def-odds-multiplier) of $\diffvpredvar$: $$ -\oddsf{\vpredvar'} = \oddsf{\vpredvar} \, \oddsfactorf{\diff \vpredvar}. +\oddsf{\vpredvar'} = \oddsf{\vpredvar} \, \oddsfactorf{\diffvpredvar}. $$ ::: @@ -27,19 +27,19 @@ $$ &= \e{\dprod{\vcoef}{\vpredvar'}} && \text{(log-odds of the model at } \vpredvar' \text{)} \\ -&= \e{\dprod{\vcoef}{\paren{\vpredvar + \diff \vpredvar}}} +&= \e{\dprod{\vcoef}{\paren{\vpredvar + \diffvpredvar}}} && \text{(definition of } \vpredvar' \text{)} \\ -&= \e{\dprod{\vcoef}{\vpredvar} + \dprod{\vcoef}{\diff \vpredvar}} +&= \e{\dprod{\vcoef}{\vpredvar} + \dprod{\vcoef}{\diffvpredvar}} && \text{(the dot product is linear in each slot)} \\ -&= \e{\dprod{\vcoef}{\vpredvar}} \, \e{\dprod{\vcoef}{\diff \vpredvar}} +&= \e{\dprod{\vcoef}{\vpredvar}} \, \e{\dprod{\vcoef}{\diffvpredvar}} && \text{(} \e{a + b} = \e{a} \e{b} \text{)} \\ -&= \oddsf{\vpredvar} \, \e{\dprod{\vcoef}{\diff \vpredvar}} +&= \oddsf{\vpredvar} \, \e{\dprod{\vcoef}{\diffvpredvar}} && \text{(log-odds of the model at } \vpredvar \text{)} \\ -&= \oddsf{\vpredvar} \, \oddsfactorf{\diff \vpredvar}. +&= \oddsf{\vpredvar} \, \oddsfactorf{\diffvpredvar}. && \text{(definition of the odds multiplier)} \ea $$ diff --git a/latex-macros b/latex-macros index e445125749..ae1d822fca 160000 --- a/latex-macros +++ b/latex-macros @@ -1 +1 @@ -Subproject commit e445125749808ed743c93ef1b2b20824ec067e1e +Subproject commit ae1d822fca56e2df2fe1c8d44adaae0d81e879b2