Model: Model object, ready for sampling

Description Public fields Active bindings Methods See Also

Description

Model object, ready for sampling

Model object, ready for sampling

Public fields

cmdstanr_version

Version of cmdstanr used to build models

cmdstan_version

Version of cmdstan used to build models

Active bindings

standata

used to fit model

form

used to fit model

prior

used to fit model

cmdstanmodel

Underlying cmdstanr::CmdStanModel

Methods

Public methods


Method new()

Usage
Model$new(d, form, id_var, prior = Prior$new())
Arguments
d

dataframe from which to make standata.

form

Form of the neuromodulation (additive or multiplicative)

id_var

Name of column indexing ids

prior

A Prior


Method sample()

Draw samples from the posterior of the model

Usage
Model$sample(data = NULL, ...)
Arguments
data

optional new data. If present, this will be used instead of the internally stored data (created when the object was initialized)

...

arguments passed to cmdstanr::sample().


Method make_standata()

Usage
Model$make_standata(d, id_var)
Arguments
d

dataframe from which to make standata.

id_var

Name of column indexing units (e.g., voxels, cells). Column must be a factor.

Returns

named list


Method clone()

The objects of this class are cloneable with this method.

Usage
Model$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

cmdstanr::sample() Prepare data for running model


psadil/nmmr documentation built on June 13, 2021, 11:42 a.m.