You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swap_observed(model, data) call builds a new model, which is equivalent to the old model, but the existing observed object is replaced with data.
My concern is that swap usually implies that there are two objects that exchange some of their properties, so they are both modified (see e.g. c++ std), whereas in this case the change is unidirectional.
I suggest to call this function replace_observed(model, data).
In principle, for single SEM models it will be enough just to have a Sem(model, data) constructor -- I think from the user perspective it is quite logical what it should do.
But for ensemble models it would probably be less clear, whereas replace_observed can have oberloads like replace_observed(model, id, data), or replace_observed(model, id => data),
or even replace_observed(model, id1 => data1, id2 => data2, ...).
The text was updated successfully, but these errors were encountered:
swap_observed(model, data)
call builds a new model, which is equivalent to the old model, but the existing observed object is replaced withdata
.My concern is that swap usually implies that there are two objects that exchange some of their properties, so they are both modified (see e.g. c++ std), whereas in this case the change is unidirectional.
I suggest to call this function
replace_observed(model, data)
.In principle, for single SEM models it will be enough just to have a
Sem(model, data)
constructor -- I think from the user perspective it is quite logical what it should do.But for ensemble models it would probably be less clear, whereas
replace_observed
can have oberloads likereplace_observed(model, id, data)
, orreplace_observed(model, id => data)
,or even
replace_observed(model, id1 => data1, id2 => data2, ...)
.The text was updated successfully, but these errors were encountered: