Hi @vijay,
I’ve identified the source of the problem. I have multiple dose data and group by occasion, as opposed to using ii. I still give the read_NCA time = :time as opposed to time = :tad. It appears that the auc function with a time interval is calculating tad itself for all the occasions, which is resulting in numerical/decimal issues. For example, my last tad should be 27.9999, but if I manually create my own tad column, and give time = :tad to read_NCA, I will get missing from the auc calculation on a time interval, due to the last time being 27.999899999999997.
I have fixed this issue by correcting the numerical issues:
df.tad .= ifelse.(df.tad .> 27, 27.9999, df1.tad)
It would be great if there were a way for the user to not have to deal with these numerical issues.