For each variable (for each row in data) a natural cubic spline with 3 knots is fitted using splines package. Only significative variables obtained after multiple comparison are then included in the multivariate model. Models are fitted using lm and simple least squares. Model is compared to linear model using AIC
1 2 |
data |
|
vars_df |
data.frame with sampes as rows and variables as columns |
df |
degrees of freedom to apply to model (number of knots in the natural cubic splines) |
fdr |
threshold to select linear significative vars in terms of FDR adjusted p.value |
cores |
cores in case of parallelization (no windows) |
verbose |
logical to verbose (comment) the steps of the function, default(FALSE) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.