Skip to content

Commit

Permalink
Testing beta_hat as a group field (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Jan 24, 2025
1 parent fbf6026 commit 768357e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/classes.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 11 additions & 0 deletions src/groups.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 768357e

Please sign in to comment.