Extract the population-level ('fixed') effects
from the brmsfit
object in a brmcoda
object.
Arguments
- object
An object of class
brmcoda
.- ...
Further arguments passed to
fixef.brmsfit
.
Value
If summary
is TRUE
, a matrix returned
by posterior_summary
for the population-level effects.
If summary
is FALSE
, a matrix with one row per
posterior draw and one column per population-level effect.
Examples
# \donttest{
## fit a model
if(requireNamespace("cmdstanr")){
## fit a model
m <- brmcoda(complr = complr(data = mcompd, sbp = sbp,
parts = c("TST", "WAKE", "MVPA", "LPA", "SB"),
idvar = "ID", total = 1440),
formula = Stress ~ bilr1 + bilr2 + bilr3 + bilr4 +
wilr1 + wilr2 + wilr3 + wilr4 + (1 | ID),
chain = 1, iter = 500,
backend = "cmdstanr")
## extract population-Level coefficients
fixef(m)
}# }
#> Error: The following variables can neither be found in 'data' nor in 'data2':
#> 'bilr1', 'bilr2', 'bilr3', 'bilr4', 'wilr1', 'wilr2', 'wilr3', 'wilr4'