Learn R Programming

splinetree (version 0.2.0)

flatten_predictors: Flattens predictor variable data into one row per person

Description

Assumes that splitting explanatory variables do not vary with time. Spline Tree is not meant to handle time-varying covariates.

Usage

flatten_predictors(idvar, data)

Arguments

idvar

The string name of the ID variable (used to group observations)

data

The full dataset to be flattened (long form)

Value

A wide format dataset with spline coefficients as the responses.