plot.reg {quickReg} | R Documentation |
plot the result of regression result
Description
plot coefficients, OR or HR of regression models.
Usage
## S3 method for class 'reg'
plot(x, limits = c(NA, NA), sort = "order", title = NULL,
remove = TRUE, ...)
plot_reg(x, limits = c(NA, NA), sort = "order", title = NULL,
remove = TRUE, term = NULL, center = NULL, low = NULL, high = NULL,
model = NULL, ...)
Arguments
x |
A reg, reg_y or reg_x object without covariates information, 'cov_show=FALSE' |
limits |
A numeric vector of length two providing limits of the scale. Use NA to refer to the existing minimum or maximum value. |
sort |
A character determining the order of variables to plot, 'alphabetical' or 'order'. The later is the default to sort variables according to their effect size. |
title |
title of plot |
remove |
A logical, whether to remove infinite and NA value. The default is TRUE |
... |
additional arguments. When using your own regression results rather than from 'quickReg', please provide 'term','center','lower', 'high' and 'model' for plot. |
term |
A character of x axis variable in plot |
center |
A character of coefficient, OR or HR variable in plot |
low |
A character of lower confidence interval variable |
high |
A character of upper confidence interval variable |
model |
A character of model, "lm", "glm" or "coxph" |
See Also
Examples
reg_glm<-reg(data = diabetes, y = 5, factor = c(1, 3, 4), model = 'glm')
plot(reg_glm)
plot(reg_glm, limits = c(NA, 3))