# VPC for TAD vs CONCENTRATION Profile

Hi …
I have used below code for VPC ( taken from introduction to pumas tutorial)
it gives me TIME vs CONCENTRATION plot . but i need Time from previous dose VS concentration Plot.
can someone helps me with this?

Thank you

``````pk_vpc = vpc(pkfit_2cmp_unfix_ka, 200; dv=:CONC,
plot(pk_vpc,
size=(1800,1800), xlabel="Time after dose (hours)",
ylabel = "CTMNopain concentration (ng/mL)" ,
titlefontsize=20,guidefontsize=20,
markersize=10, markeralpha = 0.5, markercolor =:grey,
observations = true,
observed_quantiles = true,
simquantile_medians = true,
ci_bands = true,
legend=true, legendfontsize = 20,
titlefontcolor = :blue,
linewidth =10,
xtickfont = font(25),
ytickfont = font(25))
``````

Hi @sai_matcha, for this you would have to manipulate the dataset to have the TAD values in a column and pass that in to the `read_pumas` as one of the `covariates`. It should then be specified with `covariates=[:TAD]` in the `vpc` call and will then be used as the independent variable.

HI @Vaibhavdixit02 .
used it as a dummy covariate in model as well (P = TVP *(TAD^0))
i have used below code to pass it to VPC

``````pk_vpc = vpc(R130_FINALMODEL_result_p,1; dv=:DV,
# stratify_by = [:DOSE],
``````

it gave below error

``````ERROR: MethodError: no method matching vpc(::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:tvka, :tvk23, :tvvc, :tvvp, :tvQ, :tvCL, :tvbio, :θ, :Ω1, :Ω2, :σ1, :σ2),Tuple{RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},VectorDomain{Array{TransformVariables.Infinity{false},1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},PSDDomain{Array{Float64,2}},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64}}}},Serialization.__deserialized_types__.var"#533#563",Serialization.__deserialized_types__.var"#534#564",Serialization.__deserialized_types__.var"#536#566",Pumas.LinearODE,Serialization.__deserialized_types__.var"#537#567",Serialization.__deserialized_types__.var"#550#580"},Array{Subject{NamedTuple{(:DV,),Tuple{Array{Union{Missing, Float64},1}}},Pumas.ConstantInterpolationStructArray{Array{Float64,1},StructArrays.StructArray{NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD),Tuple{Float64,Float64,Float64,Int64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64}},1,NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD),Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Int64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1}}},Int64},Symbol},Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Nothing,Int64},1},Array{Float64,1}},1},Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#339#340"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat},Float64,Array{Float64,1},Float64,Float64,Array{Optim.OptimizationState{Float64,Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#339#340"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.FOCEI,Array{Array{Float64,1},1},NamedTuple{(:optimize_fn, :constantcoef, :omegas, :ensemblealg),Tuple{Pumas.DefaultOptimizeFN{Nothing,NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_increases),Tuple{Bool,Bool,Bool,Float64,Bool}}},NamedTuple{(:tvbio,),Tuple{Float64}},Tuple{},EnsembleThreads}},ParamSet{NamedTuple{(:tvka, :tvk23, :tvvc, :tvvp, :tvQ, :tvCL, :tvbio, :θ, :Ω1, :Ω2, :σ1, :σ2),Tuple{RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},Pumas.ConstDomain{Float64},VectorDomain{Array{TransformVariables.Infinity{false},1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},PSDDomain{Array{Float64,2}},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64}}}}}, ::Int64, ::QuantileRegressions.IP, ::Pumas.ContinuousVPC; dv=:DV, covariates=[:TAD], ensemblealg=EnsembleThreads())
Closest candidates are:
vpc(::Pumas.FittedPumasModel, ::Integer, ::Any, ::Pumas.VPCType; dv, stratify_by, quantiles, level, ensemblealg, bandwidth, numstrats, idv, count_vals, sim_idvs) at C:\Users\julia\.julia\packages\Pumas\iIBBr\src\estimation\vpc.jl:280 got unsupported keyword argument "covariates"
vpc(::Pumas.FittedPumasModel, ::Integer, ::Any) at C:\Users\julia\.julia\packages\Pumas\iIBBr\src\estimation\vpc.jl:280 got unsupported keyword arguments "dv", "covariates", "ensemblealg"
vpc(::Pumas.FittedPumasModel, ::Integer) at C:\Users\julia\.julia\packages\Pumas\iIBBr\src\estimation\vpc.jl:280 got unsupported keyword arguments "dv", "covariates", "ensemblealg"
...
Stacktrace:
[1] kwerr(::NamedTuple{(:dv, :covariates, :ensemblealg),Tuple{Symbol,Array{Symbol,1},EnsembleThreads}}, ::Function, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:tvka, :tvk23, :tvvc, :tvvp, :tvQ, :tvCL, :tvbio, :θ, :Ω1, :Ω2, :σ1, :σ2),Tuple{RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},VectorDomain{Array{TransformVariables.Infinity{false},1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},PSDDomain{Array{Float64,2}},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64}}}},Serialization.__deserialized_types__.var"#533#563",Serialization.__deserialized_types__.var"#534#564",Serialization.__deserialized_types__.var"#536#566",Pumas.LinearODE,Serialization.__deserialized_types__.var"#537#567",Serialization.__deserialized_types__.var"#550#580"},Array{Subject{NamedTuple{(:DV,),Tuple{Array{Union{Missing, Float64},1}}},Pumas.ConstantInterpolationStructArray{Array{Float64,1},StructArrays.StructArray{NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD),Tuple{Float64,Float64,Float64,Int64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64}},1,NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD),Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Int64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1}}},Int64},Symbol},Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Nothing,Int64},1},Array{Float64,1}},1},Optim.MultivariateOptimizationResults{Optim.BFGSL
ineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#339#340"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat},Float64,Array{Float64,1},Float64,Float64,Array{Optim.OptimizationState{Float64,Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#339#340"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.FOCEI,Array{Array{Float64,1},1},NamedTuple{(:optimize_fn, :constantcoef, :omegas, :ensemblealg),Tuple{Pumas.DefaultOptimizeFN{Nothing,NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_in:Ω1, :Ω2, :σ1, :σ2),Tuple{RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},Pumas.ConstDomain{Float64},VectorDomain{Array{TransformVariables.Infinity{false},1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},PSDDomain{Array{Float64,2}},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64}}}}}, ::Int64, ::QuantileRegressions.IP, ::Pumas.ContinuousVPC) at .\error.jl:157
[2] top-level scope at none:1
``````

Can you say where did i do wrong ?

Thank you.

Oh that’s because of the previous release of Pumas. Sorry, I forgot that we haven’t had a release since the syntax I mentioned above was added. Instead of `covariates=[:TAD]` pass in `idv = :TAD` that should hopefully work for you

HI @Vaibhavdixit02 i tried it

``````pk_vpc = vpc(R130_FINALMODEL_result_p,1; dv=:DV,idv = :TAD,
# stratify_by = [:EVID],
``````

it gave below error

``````ERROR: ArgumentError: column name :TAD not found in the data frame; existing most similar names are: :id
Stacktrace:
[1] lookupname at C:\Users\julia\.julia\packages\DataFrames\GtZ1l\src\other\index.jl:289 [inlined]
[2] getindex at C:\Users\julia\.julia\packages\DataFrames\GtZ1l\src\other\index.jl:295 [inlined]
[3] getindex(::DataFrame, ::typeof(!), ::Symbol) at C:\Users\julia\.julia\packages\DataFrames\GtZ1l\src\dataframe\dataframe.jl:435
[4] _vpc(::Array{Subject{NamedTuple{(:DV,),Tuple{Array{Union{Missing, Float64},1}}},Pumas.ConstantInterpolationStructArray{Array{Float64,1},StructArrays.StructArray{NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD, :TAD),Tuple{Float64,Float64,Float64,Int64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64}},1,NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD, :TAD),Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Int64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1}}},Int64},Symbol},Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Nothing,Int64},1},Array{Float64,1}},1}, ::QuantileRegressions.IP, ::Pumas.ContinuousVPC; dv::Symbol, idv::Symbol, stratify_by::Nothing, quantiles::Tuple{Float64,Float64,Float64}, bandwidth::Int64, numstrats::Nothing) at C:\Users\julia\.julia\packages\Pumas\iIBBr\src\estimation\vpc.jl:109
[5] vpc(::PumasModel{ParamSet{NamedTuple{(:tvka, :tvk23, :tvvc, :tvvp, :tvQ, :tvCL, :tvbio, :θ, :Ω1, :Ω2, :σ1, :σ2),Tuple{RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},VectorDomain{Array{TransformVariables.Infinity{false},1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},PSDDomain{Array{Float64,2}},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64}}}},Serialization.__deserialized_types__.var"#69#99",Serialization.__deserialized_types__.var"#70#100",Serialization.__deserialized_types__.var"#72#102",Pumas.LinearODE,Serialization.__deserialized_types__.var"#73#103",Serialization.__deserialized_types__.var"#86#116"}, ::Array{Subject{NamedTuple{(:DV,),Tuple{Array{Union{Missing, Float64},1}}},Pumas.ConstantInterpolationStructArray{Array{Float64,1},StructArrays.StructArray{NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD, :TAD),Tuple{Float64,Float64,Float64,Int64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64}},1,NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD, :TAD),Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Int64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1}}},Int64},Symbol},Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Nothing,Int64},1},Array{Float64,1}},1}, ::NamedTuple{(:tvka, :tvk23, :tvvc, :tvvp, :tvQ, :tvCL, :tvbio, :θ, :Ω1, :Ω2, :σ1, :σ2),Tuple{Float64,Float64,Float64,Float64,Float64,Float64,Float64,Array{Float64,1},PDMats.PDiagMat{Float64,Array{Float64,1}},PDMats.PDMat{Float64,Array{Float64,2}},Float64,Float64}}, ::Int64, ::QuantileRegressions.IP, ::Pumas.ContinuousVPC; dv::Symbol, stratify_by::Nothing, quantiles::Tuple{Float64,Float64,Float64}, level::Float64, ensemblealg::EnsembleThreads, bandwidth::Int64, numstrats::Nothing, idv::Symbol, count_vals::Array{Float64,1}, sim_idvs::Nothing) at C:\Users\julia\.julia\packages\Pumas\iIBBr\src\estimation\vpc.jl:201
[6] vpc(::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:tvka, :tvk23, :tvvc, :tvvp, :tvQ, :tvCL, :tvbio, :θ, :Ω1, :Ω2, :σ1, :σ2),Tuple{RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},VectorDomain{Array{TransformVariables.Infinity{false},1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},PSDDomain{Array{Float64,2}},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64}}}},Serialization.__deserialized_types__.var"#69#99",Serialization.__deserialized_types__.var"#70#100",Serialization.__deserialized_types__.var"#72#102",Pumas.LinearODE,Serialization.__deserialized_types__.var"#73#103",Serialization.__deserialized_types__.var"#86#116"},Array{Subject{NamedTuple{(:DV,),Tuple{Array{Union{Missing, Float64},1}}},Pumas.ConstantInterpolationStructArray{Array{Float64,1},StructArrays.StructArray{NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD, :TAD),Tuple{Float64,Float64,Float64,Int64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64}},1,NamedTuple{(:WT, :INITWT, :DFWT, :M, :SCR, :INITBMI, :DFBMI, :INITFFM, :DFFFM, :SCRD, :GA, :PMA, :AGEYRS, :BMI, :FFM, :ALBD, :TAD),Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Int64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1}}},Int64},Symbol},Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Nothing,Int64},1},Array{Float64,1}},1},Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#339#340"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat},Float64,Array{Float64,1},Float64,Float64,Array{Optim.OptimizationState{Float64,Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#339#340"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.FOCEI,Array{Array{Float64,1},1},NamedTuple{(:optimize_fn, :constantcoef, :omegas, :ensemblealg),Tuple{Pumas.DefaultOptimizeFN{Nothing,NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_increases),Tuple{Bool,Bool,Bool,Float64,Bool}}},NamedTuple{(:tvbio,),Tuple{Float64}},Tuple{},EnsembleThreads}},ParamSet{NamedTuple{(:tvka, :tvk23, :tvvc, :tvvp, :tvQ, :tvCL, :tvbio, :θ, :Ω1, :Ω2, :σ1, :σ2),Tuple{RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64},Pumas.ConstDomain{Float64},VectorDomain{Array{TransformVariables.Infinity{false},1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},PSDDomain{Array{Float64,2}},RealDomain{Float64,Int64,Float64},RealDomain{Float64,Int64,Float64}}}}}, ::Int64, ::QuantileRegressions.IP, ::Pumas.ContinuousVPC; dv::Symbol, stratify_by::Nothing, quantiles::Tuple{Float64,Float64,Float64}, level::Float64, ensemblealg::EnsembleThreads, bandwidth::Int64, numstrats::Nothing, idv::Symbol, count_vals::Array{Float64,1}, sim_idvs::Nothing) at C:\Users\julia\.julia\packages\Pumas\iIBBr\src\estimation\vpc.jl:280
[7] top-level scope at none:1

``````

But i actually have TAD as covariate in my DF and passed to read_pumas . PUMAS itself also calculated “tad” from the time points i gave in data. i tried with both TAD’s both did not work.

``````
julia> BM1DF1
Population
Subjects: 134
Covariates: WT, INITWT, DFWT, M, SCR, INITBMI, DFBMI, INITFFM, DFFFM, SCRD, GA, PMA, AGEYRS, BMI, FFM, ALBD, TAD
Observables: DV

julia> DataFrame(BM1DF1)
3310×32 DataFrame. Omitted printing of 16 columns
│ Row  │ id      │ time     │ evid   │ DV       │ amt      │ dose     │ tad      │ cmt    │ rate     │ duration  │ ss     │ ii       │ base_time │ rate_dir │ route    │ WT      │
│      │ String? │ Float64? │ Int64? │ Float64? │ Float64? │ Float64? │ Float64? │ Int64? │ Float64? │ Float64?  │ Int64? │ Float64? │ Float64?  │ Int8?    │ Nothing? │ Float64 │
├──────┼─────────┼──────────┼────────┼──────────┼──────────┼──────────┼──────────┼────────┼──────────┼───────────┼────────┼──────────┼───────────┼──────────┼──────────┼─────────┤
│ 1    │ 1       │ 0.0      │ 1      │ missing  │ 475.0    │ 475.0    │ 0.0      │ 2      │ 2910.88  │ 0.163181  │ 0      │ 0.0      │ 0.0       │ 1        │          │ 24.257  │
│ 2    │ 1       │ 10.25    │ 1      │ missing  │ 60.0     │ 60.0     │ 0.0      │ 1      │ 0.0      │ 0.0       │ 0      │ 0.0      │ 10.25     │ 1        │          │ 24.257  │
│ 3    │ 1       │ 21.28    │ 1      │ missing  │ 60.0     │ 60.0     │ 0.0      │ 1      │ 0.0      │ 0.0       │ 0      │ 0.0      │ 21.28     │ 1        │          │ 24.257  │
│ 3307 │ 178     │ 102.9    │ 0      │ 1.4      │ missing  │ 4.0      │ 8.08     │ 2      │ missing  │ missing   │ 0      │ missing  │ missing   │ missing  │          │ 2.845   │
│ 3308 │ 178     │ 102.98   │ 1      │ missing  │ 4.0      │ 4.0      │ 0.0      │ 2      │ 341.4    │ 0.0117165 │ 0      │ 0.0      │ 102.98    │ 1        │          │ 2.845   │
│ 3309 │ 178     │ 110.68   │ 1      │ missing  │ 4.0      │ 4.0      │ 0.0      │ 2      │ 341.4    │ 0.0117165 │ 0      │ 0.0      │ 110.68    │ 1        │          │ 2.845   │
│ 3310 │ 178     │ 120.15   │ 1      │ missing  │ 4.0      │ 4.0      │ 9.47     │ 2      │ 341.4    │ 0.0117165 │ 0      │ 0.0      │ 120.15    │ 1        │          │ 2.845   │
``````

Since it’s `tad` and not `TAD` in your data frame, in the `read_pumas` call you have probably passed `:TAD` and that’s why you are seeing the issue, use `:tad` for `covariates` in `read_pumas` and for `idv` in `vpc`

“tad” you are seeing in DF is created by PUMAS by its default nature. In my input i have given TAD and passed it as covariate

``````julia> BM1DF1
Population
Subjects: 134
Covariates: WT, GA, PMA, AGEYRS, BMI, FFM, ALBD, TAD
Observables: D
``````

any way i have given both as idv in vpc . it results in same error

Can you share the data and code with me? Maybe on direct message or email whatever you prefer

sure . I will connect to you in slack.
Thankyou