Flattens predictor variable data into one row per person
Assumes that splitting explanatory variables do not vary with time. Spline Tree is not meant to handle time-varying covariates.
flatten_predictors(idvar, data)
idvar
: The string name of the ID variable (used to group observations)data
: The full dataset to be flattened (long form)A wide format dataset with spline coefficients as the responses.
Useful links