Calculates the CV% for Omega/Sigma diagonal parameters based on the
specified transformation. For LogNormal and AddErr transforms, uses
sqrt(exp(estimate) - 1) * 100. For Proportional, uses sqrt(estimate) * 100.
Returns NA for Theta parameters or Identity transform as CV is not meaningful.
Usage
compute_cv(estimate, param_type, transform = "identity")
Arguments
- estimate
The parameter estimate(s) (variance scale), can be a vector
- param_type
Parameter type(s), can be a vector: "Theta", "Omega", or "Sigma"
- transform
Transformation type(s), can be a vector: "LogNormal", "AddErr", "Proportional", or "Identity". Defaults to "Identity".
Value
CV as a percentage (vector), or NA if not applicable
Examples
if (FALSE) { # \dontrun{
compute_cv(0.09, "Omega", "LogNormal")
df %>% mutate(cv = compute_cv(estimate, kind, "LogNormal"))
} # }