getEventsToEpisodesMapping: getEventsToEpisodesMapping

View source: R/adherer.R

getEventsToEpisodesMappingR Documentation

getEventsToEpisodesMapping

Description

This function returns the event-to-episode mapping, if this information exists.

Usage

getEventsToEpisodesMapping(x)

Arguments

x

Either a data.frame as returned by compute.treatment.episodes() or an CMA_per_episode object.

Details

There are cases where it is interesting to know which events belong to which episodes and which events have been actually used in computing the simple CMA for each episode. This information can be returned by compute.treatment.episodes() and CMA_per_episode() if the parameter return.mapping.events.episodes is set to TRUE.

Value

The mapping between events and episodes, if it exists either as the attribute mapping.episodes.to.events of the data.frame or as the mapping.episodes.to.events component of the CMA_per_episode object object, or NULL otherwise.


AdhereR documentation built on July 5, 2022, 5:08 p.m.