Description Usage Arguments Value References
reglog is able to perform logistic regression with variable selection and gives as a result a matrix with variable names, odds-ratios, confidence intervals and p-values of univariate and multivariate models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
DF |
dataframe, matrix or tibble that contains all explicatives variables and the variable to explain |
y |
character : name of the variable to explain |
explicatives |
character vector : variables that should explain y in the logistic regression. Takes all columns but y from the dataframe if kept empty. |
alpha |
num : significance threeshold used to delete non-significant variables in the multivariate model. |
verbose |
logical : if TRUE, explainations are displayed in the console while running the function. |
alpha_max |
num : maximum threeshold used to select the minimum multivariate variables wanted. |
round |
num : number of digits to display in the final table. |
keep |
all the variables that should be kept in the multivariate results |
exit |
specify where do you want to display the results : console (the default), excel (in a results.xlsx file), html (using kable) |
method |
the method that will be used to select variables in the multivariate model.The default method is the backward elimination. See 'details' section for more informations. |
reglog returns a matrix with all OR obtain from univariate model and OR obtain from the multivariate model
Bursac, Z., Gauss, C.H., Williams, D.K. et al. Purposeful selection of variables in logistic regression. Source Code Biol Med 3, 17 (2008). https://doi.org/10.1186/1751-0473-3-17
Heinze G, Schemper M. A solution to the problem of separation in logistic regression. Stat Med. 2002;21(16):2409-2419. doi:10.1002/sim.1047
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.