Add a model specification to an instrument
Arguments
- instrument
An
sframeobject.- model
An
sf_model()object.- validate
Logical. Whether to validate the model against the instrument before adding it.
- replace
Logical. Whether to replace an existing model with the same ID. Defaults to
TRUE.
Examples
demo <- sframe_demo_data()
m <- sf_model("cb1", type = "cb_sem",
constructs = list(sf_construct("sat", items = c("sat_1", "sat_2"))))
instr <- add_model(demo$instrument, m)
length(instr$models)
#> [1] 4