plot.reg | R Documentation |
plot coefficients, OR or HR of regression models.
## 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, ... )
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" |
reg
, reg_x
, reg_y
reg_glm<-reg(data = diabetes, y = 5, factor = c(1, 3, 4), model = 'glm') plot(reg_glm) plot(reg_glm, limits = c(NA, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.