Skip to contents

This function apply all functions to go from a categorical functional data with different states to a list of one dataframe per state indicatrice (in the ascending order) whose duplicated states where removed.

Usage

cat_data_to_indicator(data, id_col = "id", time_col = "time")

Arguments

data

a multistates dataframe ('id', 'time', 'states')

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)
df_list = cat_data_to_indicator(df)