-
Notifications
You must be signed in to change notification settings - Fork 3
Description
In 'Regression Analysis in R: Adapting to Varied Data Types' the following lines are used to help render the fitted regression model.
Lines 690 to 696 in b83cec6
```{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:
Line 696 in b83cec6
`r logEq`. |
The resultant rendered line (when using learnr/shiny) will look like this:
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).