View source: R/preprocessing.R
find_shift_factor | R Documentation |
Function that calculates a value used to shift predictor
find_shift_factor(x)
x |
a numeric vector. |
For details on why shifting is necessary see the corresponding section in the
documentation of mfp2()
.
This function implements the formula in Section 4.7 of Royston and Sauerbrei (2008).
A numeric value that can be used to shift x
to positive values.
If all values are positive, or if x
is binary then 0 is returned.
Royston, P., and Sauerbrei, W., 2008. Multivariable Model - Building: A Pragmatic Approach to Regression Anaylsis based on Fractional Polynomials for Modelling Continuous Variables. John Wiley & Sons.
x = 1:1000
find_shift_factor(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.