Given the model, the data and the formula for the model,
this function will return the combined stan data generated by bmm and
brms
Arguments
- object
A
bmmformulaobject- data
An object of class data.frame, containing data of all variables used in the model. The names of the variables must match the variable names passed to the
bmmodelobject for required argurments.- model
A description of the model to be fitted. This is a call to a
bmmodelsuch asmixture3p()function. Every model function has a number of required arguments which need to be specified within the function call. Callsupported_models()to see the list of supported models and their required arguments- ...
Further arguments passed to
brms::standata(). See the description ofbrms::standata()for more details
Examples
sdata1 <- standata(bmf(c ~ 1, kappa ~ 1),
data = oberauer_lin_2017,
model = sdm(resp_error = "dev_rad")
)
str(sdata1)
#> List of 12
#> $ N : int 15200
#> $ Y : num [1:15200(1d)] 0.384 -0.4538 -0.0873 0.3665 -0.0349 ...
#> $ K : int 1
#> $ Kc : num 0
#> $ X : num [1:15200, 1] 1 1 1 1 1 1 1 1 1 1 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:15200] "1" "2" "3" "4" ...
#> .. ..$ : chr "Intercept"
#> ..- attr(*, "assign")= int 0
#> $ K_c : int 1
#> $ Kc_c : num 0
#> $ X_c : num [1:15200, 1] 1 1 1 1 1 1 1 1 1 1 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:15200] "1" "2" "3" "4" ...
#> .. ..$ : chr "Intercept"
#> ..- attr(*, "assign")= int 0
#> $ K_kappa : int 1
#> $ Kc_kappa : num 0
#> $ X_kappa : num [1:15200, 1] 1 1 1 1 1 1 1 1 1 1 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:15200] "1" "2" "3" "4" ...
#> .. ..$ : chr "Intercept"
#> ..- attr(*, "assign")= int 0
#> $ prior_only: int 0
#> - attr(*, "class")= chr [1:2] "standata" "list"