getError: getError

View source: R/getError.R

getErrorR Documentation

getError

Description

Determine error from babsim runs. This error is the sum of the RMSE values for bed, intensiveBed, and intensiveBedVentilation.

Usage

getError(res, conf)

Arguments

res

Results from getDailyMaxResults.

conf

configuration

Value

This function returns a num value, that represents the combined rmse from the beds.

Examples

para <- babsimHospitalPara()
conf <- babsimToolsConf()
data <- getObkData()
set.seed(conf$seed)
para <- checkSimPara(para)
arrivalTimes <- getArrivalTimes(data$simData$Infected)
envs <- babsimHospital(
  arrivalTimes = arrivalTimes,
  conf = conf,
  para = para
)
fieldEvents <- getRealBeds(
  data = data$fieldData,
  resource = conf$ResourceNames
)
res <- getDailyMaxResults(
  envs = envs,
  fieldEvents = fieldEvents,
  conf = conf
)
err <- getError(res, conf = conf)

babsim.hospital documentation built on May 30, 2022, 9:05 a.m.