mirror of
https://github.com/agdamsbo/stRoke.git
synced 2024-11-22 04:50:23 +01:00
36 lines
949 B
R
36 lines
949 B
R
% 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{
|
|
ci_plot(ds, x, y, vars = NULL, dec = 3, lbls = NULL, title = NULL)
|
|
}
|
|
\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{
|
|
Horizontal forest plot of point estimate with confidence intervals. Includes dichotomous or olr, depending on number of levels in "x".
|
|
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"))
|
|
}
|