Skip to content

Incorrect rendering of fitted logistic regression model #13

Open
@sof202

Description

@sof202

In 'Regression Analysis in R: Adapting to Varied Data Types' the following lines are used to help render the fitted regression model.

```{r, echo = FALSE}
logEq<- paste0("$\frac{\text{ln(p(TypeIIDiabetes))}}{(1-p(TypeIIDiabetes))}", signif(coef(model.log)[1],2), " + ", signif(coef(model.log)[2],2), " * ExerciseHours + ",
signif(coef(model.log)[3],2), " * AlcoholUnits$")
```
`r logEq`.

However, because of this line:

The resultant rendered line (when using learnr/shiny) will look like this:
image

Which isn't as expected.
There are two problems here (and another minor one I guess).

First: Line 696 attempts to render a latex expression with an R parser. As a result, you end up with a upwards arrow (for the \f part) and $ signs around the expression.
Second: The = sign is missing after the fraction

Minor: The coefficient of AlcoholUnits and ExerciseHours under this seed are negative, so you end up with + - 0.123, which might be confusing to some readers (as the negative sign is much smaller than the positive sign).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions