R: Get Reference Models

get_refmodel.brmsfit {brms} | R Documentation

## Get Reference Models

### Description

Get reference model structure from `brmsfit` objects for use in `varsel` and related variable selection methods. This method is called automatically when performing variable selection via `varsel.brmsfit` and so you will rarely need to call it manually yourself.

### Usage

    ## S3 method for class 'brmsfit'
    get_refmodel(
      object,
      newdata = NULL,
      resp = NULL,
      folds = NULL,
      cvfun = NULL,
      ...
    )

### Arguments

`object` | An object of class `brmsfit`.
`newdata` | An optional data.frame for which to evaluate predictions. If `NULL` (default), the original data of the model is used. `NA` values within factors are interpreted as if all dummy variables of this factor are zero. This allows, for instance, to make predictions of the grand mean when using sum coding.
`resp` | Optional names of response variables. If specified, predictions are performed only for the specified response variables.
`folds` | Only used for k-fold variable selection. A vector of fold indices for each data point in data.
`cvfun` | Optional cross-validation function (see `get_refmodel` for details). If `NULL` (the default), `cvfun` is defined internally based on `kfold.brmsfit`.
`...` | Further arguments passed to `init_refmodel`.

### Value

A `refmodel` object to be used in `varsel` and related variable selection methods.

[Package brms version 2.16.1 Index]