add_models: Add individual variable models to a 'daps' object.

Description Usage Arguments Value

View source: R/model_specification.R

Description

It is expected that multiple entries will apply to the same variable. They should be entered in descending order of preference.

Usage

1
add_models(daps, ..., daps_model_table = NULL)

Arguments

daps

The daps-class object to add individual variable models to.

...

Individual variable models. This can by any combination of two-sided formulas and calls to modeling functions.

The left side of each formula must specify a single variable that will appear in the data. The right side will be extracted and saved to be evaluated in the context of a row of the data during simulation (i.e., in simulate()) as needed.

Calls to modeling functions are not evaluated until model training (i.e., in train()). They must be written without a data argument, as this argument will be filled in during training. The left side of the formula argument of modeling function calls must specify a single variable that will appear in the data.

Multiple formulas/model calls can specify the same variable. These should be listed in descending order of preference (which may usually also mean descending order of complexity).

These arguments are not evaluated but quoted.

Ignored if daps_model_table is not NULL.

daps_model_table

An object of class daps_model_table previously created. If not NULL, anything specified in ... will be ignored.

Value

The input daps with the added component $model_table, an object of class daps_model_table.


NikKrieger/daps documentation built on March 4, 2020, 1:28 p.m.