mirror of
https://github.com/agdamsbo/stRoke.git
synced 2024-10-29 19:01:53 +01:00
37 lines
1011 B
Plaintext
37 lines
1011 B
Plaintext
|
% 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, 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)
|
||
|
talos$bin <- factor(sample(1:2, size = nrow(talos), replace = TRUE))
|
||
|
ci_plot(ds = talos, x = "rtreat", y = "mrs_1", vars = c("hypertension","diabetes"))
|
||
|
}
|