mmrm Model Using a New DatasetExtract the call component of fit and evaluate it in a new
environment that contains the new data.
h_refit_mmrm(fit, data)An mmrm object with the same terms as fit but based on data.
(mmrm)
an mmrm object to be refit.
(data frame)
a data frame upon which fit is to be refit.
This works as follows:
A new environment is created whose parent is
environment(fit$formula_parts$full_formula).
A name is generated using h_generate_new_name(), and data is bound to
the new environment using this new name.
The call component of fit is extracted and its data argument is
changed to the new name.
The modified call is evaluated in the new environment.