getEventsToEpisodesMapping {AdhereR}R 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.


[Package AdhereR version 0.8.1 Index]