Learn R Programming

PatientLevelPrediction (version 3.0.0)

toPlpData: Convert matrix into plpData

Description

Converts a matrix (rows = people, columns=variables) into the standard plpData

Usage

toPlpData(data, columnInfo, outcomeId, outcomeThreshold = 0.5,
  indexTime = 0, includeIndexDay = T)

Arguments

data

An data.frame or matrix.

columnInfo

A dataframe with three columns, column 1 contains columnId, column 2 contains columnName for each column id and column 3 contains the columnTime - the time prior to index the variable was recorded

outcomeId

The column id containing the outcome

outcomeThreshold

The outcome value must be higher or equal to this for the person to have the outcome

indexTime

The time defining the index date

includeIndexDay

Boolean - whether to include variables recorded on index date

Value

Returns an object of class plpData

Details

This function converts matrix into plpData

Examples

Run this code
# NOT RUN {
#TODO

# }

Run the code above in your browser using DataLab