% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/StudyPopulation.R
\name{createStudyPopulation}
\alias{createStudyPopulation}
\title{Create a study population}
\usage{
createStudyPopulation(
  cohortMethodData,
  population = NULL,
  outcomeId = NULL,
  createStudyPopulationArgs = createCreateStudyPopulationArgs()
)
}
\arguments{
\item{cohortMethodData}{An object of type \link{CohortMethodData} as generated using
\code{\link[=getDbCohortMethodData]{getDbCohortMethodData()}}.}

\item{population}{If specified, this population will be used as the starting
point instead of the cohorts in the \code{cohortMethodData} object.}

\item{outcomeId}{The ID of the outcome. If NULL, no outcome-specific
transformations will be performed.}

\item{createStudyPopulationArgs}{An object of type \code{CreateStudyPopulationArgs} as created by
the \code{\link[=createCreateStudyPopulationArgs]{createCreateStudyPopulationArgs()}} function.}
}
\value{
A \code{tibble} specifying the study population. This \code{tibble} will have the following columns:
\itemize{
\item \code{rowId}: A unique identifier for an exposure.
\item \code{personSeqId}: The person sequence ID of the subject.
\item \code{cohortStartdate}: The index date.
\item \code{outcomeCount} The number of outcomes observed during the risk window.
\item \code{timeAtRisk}: The number of days in the risk window.
\item \code{survivalTime}: The number of days until either the outcome or the end of the risk window.
}
}
\description{
Create a study population
}
\details{
Create a study population by enforcing certain inclusion and exclusion criteria, defining a risk
window, and determining which outcomes fall inside the risk window.
}
