Skip to contents

This helper is designed to be used inside the covariates argument of simulate_longitudinal_dataset(). Subject-level variables are evaluated once per subject and repeated across time; observation-level variables are evaluated once per row of the long-format design.

Usage

simulate_longitudinal_covariates(data, subject = list(), observation = list())

Arguments

data

Base long-format design data supplied by simulate_longitudinal_dataset() to a covariate callback.

subject

Named list of subject-level covariate specifications.

observation

Named list of observation-level covariate specifications.

Value

A data frame of covariates aligned row-for-row with data.