Skip to contents

Coerces a data object into a list of data components required for fitting a JointModel. See the "Extending jmpost" vignette for more details.

Usage

# S3 method for class 'DataSubject'
as_stan_list(object, ...)

# S3 method for class 'DataSubject'
as.list(x, ...)

# S3 method for class 'DataLongitudinal'
as_stan_list(object, subject_var, ...)

# S3 method for class 'DataLongitudinal'
as.list(x, ...)

# S3 method for class 'DataSurvival'
model.matrix(
  object,
  df = as.data.frame(object),
  vars = extractVariableNames(object),
  ...
)

# S3 method for class 'DataSurvival'
as_stan_list(object, ...)

# S3 method for class 'DataSurvival'
as.list(x, ...)

# S3 method for class 'DataJoint'
as_stan_list(object, ...)

# S3 method for class 'DataJoint'
as.list(x, ...)

Arguments

object

(DataSubject or DataLongitudinal or DataSurvival) data object to convert to a list.

...

not used.

x

(DataSubject or DataLongitudinal or DataSurvival) data object to convert to a list.

subject_var

(character) the name of the variable containing the subject identifier.

df

(data.frame)
The data frame to be used for generating the design matrix.

vars

(list)
The list of variable names to be used for generating the design matrix.