create_probMatrix {ImputeLongiCovs} | R Documentation |
create_probMatrix
Description
create_probMatrix creates a variable that contains the transition probabilities ("initial", "forward", "backward", "intermittent", "observed")
Usage
create_probMatrix(input_data, patient_id)
Arguments
input_data |
A dataset in a format similar to 'initial_data'. This dataset must contain the variables "state_from", which is the status at the beginning of the transition (say smoker in 2010), "state_to", which is the status at the end of the transition (say ex-smoker in 2011) and "tran_Year", which is an integer variable that is equal to the number of transitions. "tran_Year" == 1 means that the transition occurs from 2010 to 2011, "tran_Year" == 2, from 2011 to 2012, up to the total number of transitions |
patient_id |
A character variable that specifies the column name with the unique Id of the patient |
Value
a data frame containing the column "prob_matrix"
Examples
create_probMatrix(initial_data, patient_id = "patient_id")