From 768357e37abecab193e61216d414b927eba13148 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 24 Jan 2025 14:14:33 +0100 Subject: [PATCH] Testing `beta_hat` as a group field (#11) --- src/classes.R | 1 + src/groups.R | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/classes.R b/src/classes.R index b066fc7..c09b41a 100644 --- a/src/classes.R +++ b/src/classes.R @@ -5,6 +5,7 @@ group <- setRefClass( haukeland_vyntus = "numeric", # proportion of vyntus and surgical (see grid) haukeland = "numeric", # proportion of surgical centres vyntus = "numeric", # proportion of vyntus software + beta_hat = "list", vo2_ml_min = "function", vo2_ml_kg_min = "function", heart_rate = "function", diff --git a/src/groups.R b/src/groups.R index 5a24d4e..3cb2da1 100644 --- a/src/groups.R +++ b/src/groups.R @@ -2,6 +2,17 @@ simple <- group( haukeland_vyntus = c(0.3652, 0.0499, 0.5820, 0.0029), haukeland = 0.4151, vyntus = 0.0528, + beta_hat = list( + vo2_ml_min = numeric( + 0.0155584, 0.4371531, 0.0009139, -0.1803019, 0.102317, 3.760053 + ), + vo2_ml_kg_min = numeric(), + heart_rate = numeric(), + ventilation = numeric(), + oxygen_pulse = numeric(), + ve_vco2_slope = numeric(), + breathing_frequency = numeric() + ), vo2_ml_min = function(.self, person) { results = apply(.self$grid, 1, function(config) { exp(