stack_gradients: Stack gradients into a single data.frame

stack_gradientsR Documentation

Stack gradients into a single data.frame

Description

Take the gradients returned by the get_mmm_derivatives function and stack these into a single data.frame for further processing

Usage

stack_gradients(derivatives, data, id, pairs)

Arguments

derivatives

list with derivatives returned by the get_mmm_derivatives() function.

data

The data.frame with original data in long format.

id

A character value with the subject identifier in the orginal data.

pairs

A character matrix with pairs returned by the make_pairs function.

parameter_labels

The parameter labels returned by the stack_parameters() function.

Value

A data.frame with subject level gradients for every longitudinal outcome


JanvandenBrand/jmmm documentation built on May 30, 2022, 9:37 a.m.