====== Custom Formula ======
The online calculator tool on Evidencio enables the creation of basically any formula as long as there will be a single outcome eventually.
Evidencio provides several standard formulas for regression models, such as the [[logistic_regression|logistic regression]] or the [[cox_regression|Cox proportional hazard regression]] models. However, sometimes a published model presents a regression formula with a small modification. In the manual of the [[cox_regression|Cox proportional hazard regression]] we show how to deal with certain of these modifications using the variable conversions. However, this might not always be possible. It might sometimes be easier to use a custom formula in the model.
To add a custom formula model, create a new model, or edit an existing model. Go to the fourth tab //Model// and click on **Custom formula** at the model types. An extra sub-tab will show where it is possible to add the custom formula. More information on how to fill in the rest of the model can be found [[creating_a_model|here]].
===== Example 1: Easy formulas =====
Not all models have to be very difficult. With the custom formula function, nearly every calculation is possible to add online. This example shows a step-by-step guide on how to add a very simple formula on Evidencio. The calculation of the body mass index.
The body mass index or BMI is the amount of kilograms a person weighs per square meter. So kg/m2\\
To add the BMI on Evidencio we first need the variable inputs. We need to know the height and the weight of an individual. It doesn't really matter what unit you choose as input, since the variable conversion can change it into the right unit, or the conversion can be added in the eventual formula.\\
In this {{::custom1.png?linkonly|example}}, we can see that the two variables were added without any conversion. Go to the tab **Custom formula**, select **Single**, and click on **Edit**. A small pop-up window opens where the formula can be added. Click on the buttons to add them to the formula. Don't worry if you clicked the wrong button, you can delete it by moving the mouse to the wrongly added button and click on the trash bin. If a number was added faulty, you will have to enter the whole number again (i.e. if you want to add 103.873 but you added 103.783, there is no way to insert the 87 instead of the 78 in the formula).\\
In this example the unit input for height was centimeters. To get to square meters, we have to convert the centimeters to meters. {{ ::custom2.png?linkonly |This}} screenshot shows how to add the formula for BMI.
Make sure to add some **pre-** or **post-result tekst** to make sure the user of the knows what he/she is calculating (e.g. pre-tekst: //"calculated body mass index is:"// with kg/m2 as post-result tekst")