-
Notifications
You must be signed in to change notification settings - Fork 29
Description
From the related issue discussion in #503, we figured out that it could be nice to either:
-
change the default exclude mechanism to allow making exclusions only for particular parameter outputs in the
half.life()calculations, rather than one homogenous exclude message for all -
otherwise create a exclude function to populate the message
2 points used for half-life calculationforr.squared,adj.r.squaredandcorrxywithhalf.life_points < 3
2 points used for half-life calculationshould not be also a exclude message forr.squared,adj.r.squaredrather than just a warning? It will make it more CDISC reportable and specific to the profile. Right now, this is what happens:df <- Theoph %>% filter(Subject == 1) %>% filter(Time %in% c(2.02, 7.03, 12.12)) o_conc <- PKNCAconc(df, formula = "conc ~ Time | Subject") o_data <- PKNCAdata(data.conc = o_conc, intervals = data.frame(lambda.z = TRUE, start = 0, end = Inf)) PKNCA.options(min.hl.points = 2) as.data.frame(pk.nca(o_data))No dose information provided, calculations requiring dose will return NA. # A tibble: 12 × 7 Subject start end PPTESTCD PPORRES PPANMETH exclude <ord> <dbl> <dbl> <chr> <dbl> <chr> <chr> 1 1 0 Inf tmax 2.02 "" NA 2 1 0 Inf tlast 12.1 "" NA 3 1 0 Inf lambda.z 0.0450 "" NA 4 1 0 Inf r.squared 1 "" NA 5 1 0 Inf adj.r.squared NA "" NA 6 1 0 Inf lambda.z.corrxy -1 "" NA 7 1 0 Inf lambda.z.time.first 7.03 "" NA 8 1 0 Inf lambda.z.time.last 12.1 "" NA 9 1 0 Inf lambda.z.n.points 2 "" NA 10 1 0 Inf clast.pred 5.94 "" NA 11 1 0 Inf half.life 15.4 "" NA 12 1 0 Inf span.ratio 0.331 "" NA Warning messages: 1: n must be > 2 for adj.r.squared 2: 2 points used for half-life calculationFor me personally does not sound right to consider an
r.squaredof 2 points for any summary table, but what do you think?