prepare_stan_data {rbmi}R Documentation

Prepare input data to run the Stan model

Description

Prepare input data to run the Stan model. Creates / calculates all the required inputs as required by the ⁠data{}⁠ block of the MMRM Stan program.

Usage

prepare_stan_data(ddat, subjid, visit, outcome, group)

Arguments

ddat

A design matrix

subjid

Character vector containing the subjects IDs.

visit

Vector containing the visits.

outcome

Numeric vector containing the outcome variable.

group

Vector containing the group variable.

Details

Value

A stan_data object. A named list as per ⁠data{}⁠ block of the related Stan file. In particular it returns:


[Package rbmi version 1.2.6 Index]