R/cost_scale.R

Defines functions cost_scale

Documented in cost_scale

#' Return the cost scale of a sim object
#'
#' @param sim_obj A 'sim' object derived from that frame
#' @return The cost scale of the sim object
#' @examples
#' require(tidyverse)
#' eastmid_ttw %>% poisson_reg(From,To,Dist,Count) -> mdl
#' cost_scale(mdl)
#' @export
cost_scale <- function(sim_obj) as.numeric(-1.0 / coef(sim_obj)["cost"])
chrisbrunsdon/simR documentation built on May 5, 2019, 2:41 a.m.