This function will send and take log or logistic regression fit from glm or geeglm from uvsum function, and display the OR or RR for each variable on the appropriate log scale.
forestplotUV(
response,
covs,
data,
id = NULL,
corstr = NULL,
model = "glm",
family = NULL,
digits = getOption("reportRmd.digits", 2),
conf.level = 0.95,
orderByRisk = TRUE,
colours = "default",
showEst = TRUE,
rmRef = FALSE,
logScale = getOption("reportRmd.logScale", TRUE),
nxTicks = 5,
showN = TRUE,
showEvent = TRUE
)
a plot object
character vector with names of columns to use for response
character vector with names of columns to use for covariates
dataframe containing your data
character vector which identifies clusters. Only used for geeglm
character string specifying the correlation structure. Only used for geeglm. The following are permitted: '"independence"', '"exchangeable"', '"ar1"', '"unstructured"' and '"userdefined"'
fitted model object
description of the error distribution and link function to be used in the model. Only used for geeglm
number of digits to round to
controls the width of the confidence interval
logical, should the plot be ordered by risk
can specify colours for risks less than, 1 and greater than 1.0. Default is red, black, green
logical, should the risks be displayed on the plot in text
logical, should the reference levels be removed for the plot?
logical, should OR/RR be shown on log scale, defaults to TRUE, or reportRmd.logScale if set. See https://doi.org/10.1093/aje/kwr156 for why you may prefer a linear scale.
Number of tick marks supplied to the log_breaks function to produce
Show number of observations per variable and category
Show number of events per variable and category
data("pembrolizumab")
forestplotUV(response="orr", covs=c("change_ctdna_group", "sex", "age", "l_size"),
data=pembrolizumab, family='binomial')
Run the code above in your browser using DataLab