% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CharacterizationPlots.R
\name{viewIncidenceRate}
\alias{viewIncidenceRate}
\title{View the Incidence Rates}
\usage{
viewIncidenceRate(
  incidenceData,
  ageData = NULL,
  genderData = NULL,
  stratification = "overall",
  maxAgeSampleSize = 5000
)
}
\arguments{
\item{incidenceData}{The data extracted using 'getIncidenceRates'}

\item{ageData}{The data extracted using 'getBinaryTargetBaseline' with analysisIds = 3}

\item{genderData}{The data extracted using 'getBinaryTargetBaseline' with analysisIds = 1}

\item{stratification}{Pick either overall/age/sex/year to specify whether to view the overall rates or stratified by age/sex/year}

\item{maxAgeSampleSize}{When creating the age distributions this is the max age vector length to create}
}
\value{
Returns a gt table that displays the incidence rates
}
\description{
Creates a table with the incidence rates and optionally demographics
}
\details{
Input the incidence rate data (and optionally demographic data)
}
\examples{
conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
schema <- 'main'

incidenceData <- getIncidenceRates(
  connectionHandler = connectionHandler , 
  schema = schema
  )
  
  # incidence data does not have rate values to imputing them
  incidenceData$incidenceRateP100py <- 1 +
    sample(c(-1,1),replace = TRUE)*runif(nrow(incidenceData))
  incidenceData$incidenceProportionP100p <- 0.5 +
    sample(c(-1,1),replace = TRUE)*runif(nrow(incidenceData))
  
 ageData <- getBinaryTargetBaseline(
  connectionHandler = connectionHandler, 
  schema = schema,  
  analysisIds = 3
 )
 
 genderData <- getBinaryTargetBaseline(
  connectionHandler = connectionHandler, 
  schema = schema,  
  analysisIds = 1
 )

viewIncidenceRate(
  incidenceData = incidenceData,
  ageData = ageData,
  genderData = genderData
  )
  

}
\seealso{
Other Characterization: 
\code{\link{getBinaryCaseSeries}()},
\code{\link{getBinaryRiskFactors}()},
\code{\link{getBinaryTargetBaseline}()},
\code{\link{getCaseCounts}()},
\code{\link{getCaseTargetCounts}()},
\code{\link{getCharacterizationCohortBinary}()},
\code{\link{getCharacterizationCohortContinuous}()},
\code{\link{getCharacterizationDemographics}()},
\code{\link{getCharacterizationOutcomes}()},
\code{\link{getCharacterizationTargets}()},
\code{\link{getContinuousCaseSeries}()},
\code{\link{getContinuousRiskFactors}()},
\code{\link{getDechallengeRechallenge}()},
\code{\link{getDechallengeRechallengeFails}()},
\code{\link{getIncidenceOutcomes}()},
\code{\link{getIncidenceRates}()},
\code{\link{getIncidenceTargets}()},
\code{\link{getTargetBinaryFeatures}()},
\code{\link{getTargetContinuousFeatures}()},
\code{\link{getTimeToEvent}()},
\code{\link{plotAgeDistributions}()},
\code{\link{plotSexDistributions}()}
}
\concept{Characterization}
