summariseObservationPeriod {OmopSketch}R Documentation

Summarise the observation period table getting some overall statistics in a summarised_result object.

Description

Summarise the observation period table getting some overall statistics in a summarised_result object.

Usage

summariseObservationPeriod(
  observationPeriod,
  estimates = c("mean", "sd", "min", "q05", "q25", "median", "q75", "q95", "max",
    "density"),
  ageGroup = NULL,
  sex = FALSE,
  dateRange = NULL
)

Arguments

observationPeriod

observation_period omop table.

estimates

Estimates to summarise the variables of interest ( ⁠records per person⁠, ⁠duration in days⁠ and ⁠days to next observation period⁠).

ageGroup

A list of age groups to stratify results by.

sex

Boolean variable. Whether to stratify by sex (TRUE) or not (FALSE).

dateRange

A list containing the minimum and the maximum dates defining the time range within which the analysis is performed.

Value

A summarised_result object with the summarised data.

Examples


library(dplyr, warn.conflicts = FALSE)

cdm <- mockOmopSketch(numberIndividuals = 100)

result <- summariseObservationPeriod(cdm$observation_period)

result |>
  glimpse()

PatientProfiles::mockDisconnect(cdm)


[Package OmopSketch version 0.2.0 Index]