marginal_data_grid: Create data grid

View source: R/marginal_data_grid.R

marginal_data_gridR Documentation

Create data grid

Description

Helper to create a data grid, expands modelr::datagrid

Usage

marginal_data_grid(model, ...)

Arguments

model

Model fit from 'brm'

...

Predictor names, optionally set to hold specific levels to predict with

Value

Data grid with random effects set at NA and predictors set either at a specific value or containing all levels

Examples


# Numeric var center_log_freq set to 0,
# Factor var condition uses every level
# Factor var tune uses every level
# So, you'll get every combination of condition and tune held constant at
# centered_log_frequency of 0
## Not run: 
  marginal_data_grid(bmdl, tune, center_log_freq = 0, condition = 'lower')

## End(Not run)

tsostarics/sostools documentation built on June 1, 2025, 10:20 p.m.