A constructor function for creating S3 objects of class stansim_data. stansim_data objects are the in-memory option for storing the results of a call to stansim_simulate() and feeding the results to stansim().

stansim_data(data_name, datasets, compiled_model, input_data, param_values,
  vars)

Arguments

data_name

A name attached to the stansim_data object to help identify it. This also forms the stem of the individual .rds file names after a call to write_data(). It is strongly recommended that an informative name is assigned.

datasets

A vector of names of simulated datasets.

compiled_model

An object of S4 class stanmodel, this should be the model provided to stansim_simulate() to simulate data from.

input_data

Values for the data field in the provided stan model.

param_values

A list containing the named values for the stan model parameters used to simulate data.

vars

The names of the stan variables saved.

Value

An S3 object of class stansim_data.