https://github.com/StatisticsHealthEconomics/outstandR/blob/eb73eae57f6f9596f70bad71f9a756d80b91bac6/R/mim.R#L78C1-L82C5