You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notes:
Arithmetic-scale CV to log-scale standard deviation (sigma):
sigma=sqrt(log(CV^2+1))
Log-scale standard deviation (sigma) to arithmetic-scale CV:
CV=sqrt(exp(sigma^2)-1)
Example (will need to strip out m1$ in source code):
m1 <- fit_rema(input)
tidyr::expand_grid(model_name = m1$input$model_name,
variable = 'tot_biomass_pred',
year = m1$input$data$model_yrs) %>%
dplyr::mutate(log_pred = m1$sdrep$value[names(m1$sdrep$value) == 'log_tot_biomass_pred'],
sd_log_pred = m1$sdrep$sd[which(names(m1$sdrep$value) == 'log_tot_biomass_pred')],
log_pred_lci = log_pred - qnorm(0.975) * sd_log_pred,
log_pred_uci = log_pred + qnorm(0.975) * sd_log_pred,
pred = exp(log_pred),
pred_cv = sqrt(exp(sd_log_pred^2) - 1),
# assumed 95% confidence interval when you use a mean and CV on
# the arithmetic scale and assume it's normal on the log-scale
pred_lci = exp(log_pred - qnorm(0.975) * sd_log_pred),
pred_uci = exp(log_pred + qnorm(0.975) * sd_log_pred))
Alternate method (apparently there's no statistical justification to do it one way or the other):
And maybe the CV on the arithmetic scale for users who want to use total biomass as inputs to another model like SS3?
rema/R/tidy_rema.R
Line 328 in b6c1ae9
Notes:
Arithmetic-scale CV to log-scale standard deviation (sigma):
sigma=sqrt(log(CV^2+1))
Log-scale standard deviation (sigma) to arithmetic-scale CV:
CV=sqrt(exp(sigma^2)-1)
Example (will need to strip out
m1$
in source code):Alternate method (apparently there's no statistical justification to do it one way or the other):
@careymcgilliard let me know if you want additional or different output
The text was updated successfully, but these errors were encountered: