Subtracts the overall mean from a numeric vector. This helper is used by the regression wrappers in their generated `setup` code and can also be used in hand-written `rtmb_code()` models.
Examples
center_grand_mean(c(1, 2, 3))
#> [1] -1 0 1
Subtracts the overall mean from a numeric vector. This helper is used by the regression wrappers in their generated `setup` code and can also be used in hand-written `rtmb_code()` models.
center_grand_mean(c(1, 2, 3))
#> [1] -1 0 1