Grouping criteria for population NCA

Hi all,

I have been working with a population dataset which has both single dose (for example: 0.1, 0.3, and 0.6) and multiple dose cohort (for example: 0.3 qw2) within the same dataset.

1- What should be the grouping criteria in the “read_nca” via the “group” argument?

When attempted grouping via :doselevel, it results in the following output in the REPL:

NCAPopulation (28 subjects):
Group: [“doselevel” => 0.1, “doselevel” => 0.3, “doselevel” => 0.6]
Number of missing observations: 22
Number of blq observations: 0

Looks like it does not take into account the multiple dose cohort (?).

2- When attempted to execute the “run_nca” function, the following error message is obtained:

ERROR: LoadError: ArgumentError: New columns must have the same length as old columns
Stacktrace:
[1] insert_single_column!(df::DataFrame, v::Vector{Any}, col_ind::Symbol)
@ DataFrames /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/nxjiD/src/dataframe/dataframe.jl:599
[2] setindex!
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/nxjiD/src/dataframe/dataframe.jl:629 [inlined]
[3] setproperty!(df::DataFrame, col_ind::Symbol, v::Vector{Any})
@ DataFrames /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/nxjiD/src/dataframe/dataframe.jl:635
[4] doseamt(::Vector{NCASubject{C, T, TT, tEltype, AUC, AUMC, D, Z, F, Float64, I, P, Int64, Pair{String, Float64}, Nothing, Nothing, Nothing, Nothing, RT} where {C, T, TT, tEltype, AUC, AUMC, D, Z, F, I, P, RT}}; label::Bool, verbose::Bool, interval::Nothing, kwargs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:sigdig, :grouplabel), Tuple{Int64, String}}})
@ NCA /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NCA/9RagW/src/NCA.jl:84
[5] (::NCA.var"#89#159"{Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:sigdig, :grouplabel), Tuple{Int64, String}}}, Vector{NCASubject{C, T, TT, tEltype, AUC, AUMC, D, Z, F, Float64, I, P, Int64, Pair{String, Float64}, Nothing, Nothing, Nothing, Nothing, RT} where {C, T, TT, tEltype, AUC, AUMC, D, Z, F, I, P, RT}}})(::Tuple{Int64, typeof(NCA.doseamt)})
@ NCA ./none:0
[6] iterate
@ ./generator.jl:47 [inlined]
[7] collect(itr::Base.Generator{Base.Iterators.Enumerate{Vector{Function}}, NCA.var"#89#159"{Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:sigdig, :grouplabel), Tuple{Int64, String}}}, Vector{NCASubject{C, T, TT, tEltype, AUC, AUMC, D, Z, F, Float64, I, P, Int64, Pair{String, Float64}, Nothing, Nothing, Nothing, Nothing, RT} where {C, T, TT, tEltype, AUC, AUMC, D, Z, F, I, P, RT}}}})
@ Base ./array.jl:678
[8] run_nca(pop::Vector{NCASubject{C, T, TT, tEltype, AUC, AUMC, D, Z, F, Float64, I, P, Int64, Pair{String, Float64}, Nothing, Nothing, Nothing, Nothing, RT} where {C, T, TT, tEltype, AUC, AUMC, D, Z, F, I, P, RT}}; parameters::Nothing, studyid::String, studytitle::String, author::Vector{Tuple{String}}, sponsor::String, date::DateTime, conclabel::String, timelabel::String, grouplabels::Vector{String}, groupsizes::NamedTuple{(), Tuple{}}, versionnumber::VersionNumber, sigdigits::Nothing, investigational_product::String, protocol_number::String, kwargs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:sigdig, :grouplabel), Tuple{Int64, String}}})
@ NCA /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NCA/9RagW/src/type.jl:540
[9] top-level scope
@ ~/data/code/pkdata_nca.jl:53
in expression starting at /home/jrun/data/code/pkdata_nca.jl:53

Please advise.

Thanks for your time and looking forward.