Add a model specification to an instrument
Arguments
- instrument
An
sframeobject.- model
An
sframe_model_spec()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.
See also
Other Models and syntax functions:
sframe_construct(),
sframe_covariance(),
sframe_indirect_effect(),
sframe_model_json(),
sframe_model_outline(),
sframe_model_spec(),
sframe_path(),
sframe_syntax_cfa(),
sframe_syntax_efa(),
sframe_syntax_pls(),
sframe_syntax_result(),
sframe_syntax_sem(),
sframe_validate_model()
Examples
demo <- sframe_demo("tourism_services")
m <- sframe_model_spec("cb1", type = "cb_sem",
constructs = list(sframe_construct("sat", items = c("sat_1", "sat_2"))))
instr <- sframe_add_model(demo$instrument, m)
length(instr$models)