Hello,
I am trying to do NCA of a single oral dose dataset. The code is as follows,
using Pumas
using CSV
using Plots
using DataFrames
using DataFramesMeta
using Distributions
using Random
using ExcelReaders
#################Data importing###########################
data_PK = CSV.read("PK_data.csv", datarow=3)
data_PK[!, :route] .= "ev"
show(first(data_PK,6))
############################################################
######## Non-Compartmental Analysis if the PK data #########
############################################################
#define units
timeu = u"hr"
concu = u"mg/L"
amtu = u"mg"
# data mapping
data_PK_pop = read_nca(data_PK,
id = :ID,
amt = :AMT,
time = :NOMTAD,
conc = :DV,
route = :route)
pk_lambdaz = NCA.lambdaz(data_PK_pop, threshold = 3) #terminal rate constant
pk_auc = NCA.auc(data_PK_pop, auctype=:inf, method =:linuplogdown)
pk_nca_results = NCAReport(data_PK_pop)
pk_nca_report = NCA.to_dataframe(pk_nca_results)
CSV.write("NCA Report.csv", pk_nca_report)
I am getting an error as follows,
Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
[ Info: ID 20 errored: lambdaz calculation needs at least three data points between Cmax and the last positive concentration
I checked the observed concentrations for ID 20, and for it, the Cmax occurred at last but 3rd time point. As a result, the parameters for ID 20 are not estimated. Any suggestions for dealing with this problem?