2022-10-11 08:25:39 +02:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
% Please edit documentation in R/ci_plot.R
|
|
|
|
\name{ci_plot}
|
|
|
|
\alias{ci_plot}
|
|
|
|
\title{Confidence interval plot with point estimate}
|
|
|
|
\usage{
|
2023-01-04 14:33:48 +01:00
|
|
|
ci_plot(ds, x, y, vars = NULL, dec = 3, lbls = NULL, title = NULL)
|
2022-10-11 08:25:39 +02:00
|
|
|
}
|
|
|
|
\arguments{
|
|
|
|
\item{ds}{data set}
|
|
|
|
|
|
|
|
\item{x}{text string of main exposure variable}
|
|
|
|
|
|
|
|
\item{y}{text string of outcome variable}
|
|
|
|
|
|
|
|
\item{vars}{variables for multivariate analysis.}
|
|
|
|
|
|
|
|
\item{dec}{Decimals in labels}
|
|
|
|
|
|
|
|
\item{lbls}{Labels for variable names}
|
|
|
|
|
|
|
|
\item{title}{Plot title. Can be specified later.}
|
|
|
|
}
|
|
|
|
\value{
|
|
|
|
ggplot element
|
|
|
|
}
|
|
|
|
\description{
|
2023-01-11 12:54:08 +01:00
|
|
|
Horizontal forest plot of point estimate with confidence intervals.
|
|
|
|
Includes dichotomous or olr, depending on number of levels in "x".
|
2022-10-11 08:25:39 +02:00
|
|
|
Title and axis labels can be added to the ggplot afterwards.
|
|
|
|
}
|
|
|
|
\examples{
|
|
|
|
data(talos)
|
|
|
|
talos[,"mrs_1"]<-factor(talos[,"mrs_1"],ordered=TRUE)
|
|
|
|
ci_plot(ds = talos, x = "rtreat", y = "mrs_1", vars = c("hypertension","diabetes"))
|
|
|
|
}
|