R/update_parm_sds.R

Defines functions update_parm_sds

update_parm_sds <- function(priors, dt, parms) {
  # Calculate the empirical standard deviation for each parameter and save it to priors object
  attr(priors, "sds") <- sapply(parms, FUN = function(x, dt) {
    sd(dt[[x]], na.rm = TRUE)
  }, dt = dt)

  return(priors)
}
carolyner/imabc documentation built on March 28, 2023, 6:43 a.m.