Skip to content

exclude message for half.life calculations on flat lines #503

@Gero1999

Description

@Gero1999

Do you think it might be worth adding a exclude message for this output case? Basically when all values are the same and we just obtain a flat line for the concentrations.... Currently when running pk.nca it produces NAs but leaves exclude without any reason for it. This is an example case

df <- Theoph %>%
  filter(Subject == 1) %>%
  mutate(conc = 1)
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))
as.data.frame(pk.nca(o_data))
# A tibble: 11 × 6
   Subject start   end PPTESTCD            PPORRES exclude
   <ord>   <dbl> <dbl> <chr>                 <dbl> <chr>  
 1 1           0   Inf tmax                    0   NA     
 2 1           0   Inf tlast                  24.4 NA     
 3 1           0   Inf lambda.z               NA   NA     
 4 1           0   Inf r.squared              NA   NA     
 5 1           0   Inf adj.r.squared          NA   NA     
 6 1           0   Inf lambda.z.time.first    NA   NA     
 7 1           0   Inf lambda.z.time.last     NA   NA     
 8 1           0   Inf lambda.z.n.points      NA   NA     
 9 1           0   Inf clast.pred             NA   NA     
10 1           0   Inf half.life              NA   NA     
11 1           0   Inf span.ratio             NA   NA     

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions