Learn R Programming

bmm (version 1.0.1)

bmf2bf: Convert bmmformula objects to brmsformula objects

Description

Called by configure_model() inside bmm() to convert the bmmformula into a brmsformula based on information in the model object. It will call the appropriate bmf2bf.\* methods based on the classes defined in the model_\* function.

Usage

bmf2bf(model, formula)

Value

A brmsformula defining the response variables and the additional parameter formulas for the specified bmmodel

Arguments

model

The model object defining one of the supported `bmmodels``

formula

The bmmformula that should be converted to a brmsformula

Examples

Run this code
  model <- mixture2p(resp_error = "error")

  formula <- bmmformula(
    thetat ~ 0 + set_size + (0 + set_size | id),
    kappa ~ 1 + (1 | id)
  )

  brms_formula <- bmf2bf(model, formula)

Run the code above in your browser using DataLab