This function is used when a predict
method is incorporated
into the vital rate expressions of a kernel. Generally, ipmr can handle this
without any additional user effort, but some model classes will fail (often
with an obscure error message).
When this happens, use_vr_model
can ensure that model object is
correctly represented in the data_list
.
use_vr_model(model)
A fitted model object representing a vital rate. Primarily used to avoid
writing the mathematical expression for a vital rate, and using a predict()
method instead.
A model object with a "flat_protect"
attribute.
ipmr usually recognizes model objects passed into the data_list
argument
automatically. Unfortunately, sometimes it'll miss one, and the user will need
to manually protect it from the standard build process. This function
provides a wrapper around that process. Additionally, please file a bug
report here: https://github.com/padrinoDB/ipmr/issues describing what type
of model you are trying to use so it can be added to later versions of the
package.
Wrap a model object in use_vr_model
when building the data_list
to pass to define_kernel
.