The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Getting Started with EpiLossR

Vinodhkumar Obli Rajendran and Keerthi Aaradhana

Introduction

EpiLossR provides standardized tools for estimating direct economic losses associated with mortality and morbidity in animal diseases.

Version 0.1.0 focuses on two core functions:

These functions return a common S3 object (epi_loss) with methods for printing, summarizing, plotting, and exporting results.

Mortality Loss

library(EpiLossR)

mort <- mortality_loss(
  animals = 100,
  mortality = 5,
  value = 10000
)

mort
#> 
#> EpiLossR
#> -----------------------------
#> Measure : Mortality Loss 
#> Estimate: 50,000 
#> Unit    : Currency

Summary

summary(mort)
#> 
#> EpiLossR Summary
#> ==============================
#> 
#> Measure : Mortality Loss 
#> Estimate: 50,000 
#> Unit    : Currency 
#> 
#> Inputs
#> ------
#> $animals
#> [1] 100
#> 
#> $mortality
#> [1] 5
#> 
#> $value
#> [1] 10000
#> 
#> 
#> Details
#> -------
#> $mortality_rate
#> [1] 0.05
#> 
#> $deaths
#> [1] 5

Plot

plot(mort)

Convert to Data Frame

as.data.frame(mort)
#>          Measure Estimate     Unit
#> 1 Mortality Loss    50000 Currency

Morbidity Loss

morb <- morbidity_loss(
  affected = 20,
  duration = 10,
  daily_loss = 100,
  treatment_cost = 5000
)

morb
#> 
#> EpiLossR
#> -----------------------------
#> Measure : Morbidity Loss 
#> Estimate: 25,000 
#> Unit    : Currency

Summary

summary(morb)
#> 
#> EpiLossR Summary
#> ==============================
#> 
#> Measure : Morbidity Loss 
#> Estimate: 25,000 
#> Unit    : Currency 
#> 
#> Inputs
#> ------
#> $affected
#> [1] 20
#> 
#> $duration
#> [1] 10
#> 
#> $daily_loss
#> [1] 100
#> 
#> $treatment_cost
#> [1] 5000
#> 
#> 
#> Details
#> -------
#> $production_loss
#> [1] 20000
#> 
#> $treatment_cost
#> [1] 5000

Plot

plot(morb)

Convert to Data Frame

as.data.frame(morb)
#>          Measure Estimate     Unit
#> 1 Morbidity Loss    25000 Currency

Session Information

sessionInfo()
#> R version 4.5.1 (2025-06-13 ucrt)
#> Platform: x86_64-w64-mingw32/x64
#> Running under: Windows 10 x64 (build 19045)
#> 
#> Matrix products: default
#>   LAPACK version 3.12.1
#> 
#> locale:
#> [1] LC_COLLATE=C                   LC_CTYPE=English_India.utf8   
#> [3] LC_MONETARY=English_India.utf8 LC_NUMERIC=C                  
#> [5] LC_TIME=English_India.utf8    
#> 
#> time zone: Asia/Calcutta
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] EpiLossR_0.1.0
#> 
#> loaded via a namespace (and not attached):
#>  [1] digest_0.6.37     R6_2.6.1          fastmap_1.2.0     xfun_0.54        
#>  [5] cachem_1.1.0      knitr_1.51        htmltools_0.5.9   rmarkdown_2.31   
#>  [9] lifecycle_1.0.5   cli_3.6.6         sass_0.4.10       jquerylib_0.1.4  
#> [13] compiler_4.5.1    rstudioapi_0.19.0 tools_4.5.1       evaluate_1.0.5   
#> [17] bslib_0.9.0       yaml_2.3.10       otel_0.2.0        jsonlite_2.0.0   
#> [21] rlang_1.3.0

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.