Logistic regression with multiple predictors
This is a convenient interface to the glm function that performs a logistic regression for one or multiple predictors and displays the results graphically. It handles continuous and categorical predictors as well as their interaction.
IQRlogisticRegression( data, VARcol, PREDcol, IDcol = "ID", PREDinteraction = NULL, PREDval = NULL, FLAGintercept = TRUE, formula = NULL, ci.level = 0.95, FLAGfirth = FALSE, refValuesPlot = NULL, xlab = NULL, ylab = NULL, pathname = NULL, FLAGreport = TRUE, SIGNIF = 4 )
A data frame containing the columns that are defined in the following.
Name of the column in data that contains the information about an event happened (1) or not (0).
Name(s) of the column in data that should be used as a predictor.
Name of the column with subject IDs (only for annotation purpose).
Character vector with comma separated predictor names for which an interaction term is included. Only second order interactions are considered.
Named vector with coefficients of numerical predictors that should be fixed (categorical are not handled yet). The intercept can be fixed by using the name 'Intercept' for the respective value. Second order interactions can be fixed by the two predictor names separated by comma. Note that the order needs to be the same as given in PREDinteraction or the formula.
Flag whether to include intercept (defaults to TRUE)
Formula or string to define the model for glm. If given (not NULL) the arguments VARcol, PREDcol, PREDinteraction, and FLAGintercept are ignored
Confidence interval level (between 0 an 1, defaults to 0.95)
Flag whether to Firth's bias-reduced penalized log-likelihood
Reference values to which predictors are fixed when plotting predictions along range for others.
Label for the x-axis.
Label for the y-axis.
If given, path to which results are written.
Whether to produce report ready table with estimates.
Number of significant digits used for the displayed values.
IQRlogisticFit object: Main output is a table with estimation results. Attributes to the output argument contain a data frame with the estimates, a data frame with predicted individual probabilities, the glm fit object, and plots with predicted probability along each predictor as well as the individual probability