Skip to contents

build_df_per_state

Usage

build_df_per_state(data_list, id_col = "id", time_col = "time")

Arguments

data_list

a list containing the dataframe of the indicator function of each state.

id_col

a character for the id column, default 'id'

time_col

a character for the time column, default 'time'

Value

a list of the ordered states in the indicator function form.

Author

Francois Bassac

Examples

N_states = 3
lambdas = lambda_determination(N_states)
transition_df = transfer_probabilities(N_states)

df = generate_X_df_multistates(nind = 100, N_states, start=0, end=100,
lambdas, transition_df)

si_df = state_indicator(df, id_col='id',
time_col='time')

split_df = split_in_state_df(si_df, id_col='id', time_col='time')