View source: R/math_functions.R
| rtmb_vector | R Documentation |
Creates a fixed-length vector that is safe to use inside 'rtmb_code()' when subsequent assignments may involve RTMB automatic-differentiation values. This is a safer alternative to 'numeric(length)' in model code.
rtmb_vector(value = 0, length, seed = NULL)
value |
Initial value. Usually a scalar such as '0'. |
length |
Length of the vector. |
seed |
Optional AD value used to create the container. Usually this can be left as 'NULL'; inside 'rtmb_code()', BayesRTMB automatically provides an AD seed from the model parameters when available. |
An AD-compatible vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.