# Error when using sigdigit in individual NCA

**URL:** <https://discourse.pumas.ai/t/error-when-using-sigdigit-in-individual-nca/830>\
**Category:** NCA\
**Created:** [February 15, 2023, 7:29pm UTC](https://discourse.pumas.ai/t/error-when-using-sigdigit-in-individual-nca/830 "2023-02-15T19:29:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![achamzas](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/achamzas/32/339_2.png) [@achamzas](https://discourse.pumas.ai/u/achamzas)\
**Post date:** [February 15, 2023, 7:29pm UTC](https://discourse.pumas.ai/t/error-when-using-sigdigit-in-individual-nca/830/1 "2023-02-15T19:29:15Z")

</div>

Hello,

I am running a simple NCA analysis but i get an error when i run the code for the individual NCA parameters. When i remove the sigdigit argument it runs.

Can you help me set the desired significant digits for the individual NCA parameters?

```auto
vz = NCA.vz(pop_oral_ss, sigdigit=3)

```

i get this error :

> ERROR: MethodError: no method matching vz(::NCASubject{Nothing, Float64, Nothing, Float64, Nothing, NCADose{Float64, Int64}, Float64}; sigdigit=3)  
> Closest candidates are:  
> vz(::NCASubject{G, T, Nothing}; pred) where {G, T\<:Union{Missing, Real, Quantity}} at /build/\_work/PumasSystemImages/PumasSystemImages/julia\_depot/packages/NCA/CDayS/src/simple.jl:302 got unsupported keyword argument “sigdigit”  
> vz(::Any, ::Any, ::Any…; dose, kwargs…) at /build/\_work/PumasSystemImages/PumasSystemImages/julia\_depot/packages/NCA/CDayS/src/NCA.jl:111  
> vz(::AbstractVector{T} where T\<:NCA.AbstractNCASubject, ::Any…; label, interval, kwargs…) at /build/\_work/PumasSystemImages/PumasSystemImages/julia\_depot/packages/NCA/CDayS/src/NCA.jl:145  
> …  
> Stacktrace:  
> [1] kwerr(::NamedTuple{(:sigdigit,), Tuple{Int64}}, ::Function, ::NCASubject{Nothing, Float64, Nothing, Float64, Nothing, NCADose{Float64, Int64}, Float64})  
> @ Base ./error.jl:163  
> [2] (::NCA.var"#1070#1080"{Nothing, Base.Pairs{Symbol, Int64, Tuple{Symbol}, NamedTuple{(:sigdigit,), Tuple{Int64}}}, Tuple{}})(::Tuple{Int64, NCASubject{Nothing, Float64, Nothing, Float64, Nothing, NCADose{Float64, Int64}, Float64}})  
> @ NCA /build/\_work/PumasSystemImages/PumasSystemImages/julia\_depot/packages/NCA/CDayS/src/NCA.jl:117  
> [3] iterate  
> @ ./generator.jl:47 [inlined]  
> [4] collect  
> @ ./array.jl:724 [inlined]  
> [5] map  
> @ ./abstractarray.jl:2896 [inlined]  
> [6] vz(::Vector{NCASubject{Nothing, Float64, Nothing, Float64, Nothing, NCADose{Float64, Int64}, Float64}}; label::Bool, interval::Nothing, kwargs::Base.Pairs{Symbol, Int64, Tuple{Symbol}, NamedTuple{(:sigdigit,), Tuple{Int64}}})  
> @ NCA /build/\_work/PumasSystemImages/PumasSystemImages/julia\_depot/packages/NCA/CDayS/src/NCA.jl:116  
> [7] top-level scope  
> @ ~/data/code/Courses/PHMX\_601/Week\_4\_NCA\_II/3\_MD\_SS\_Only.jl:89

---

<div class="post-metadata">

**Author:** ![storopoli](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/storopoli/32/190_2.png) [@storopoli](https://discourse.pumas.ai/u/storopoli)\
**Post date:** [February 16, 2023, 5:09am UTC](https://discourse.pumas.ai/t/error-when-using-sigdigit-in-individual-nca/830/2 "2023-02-16T05:09:28Z")

</div>

@achamzas, you are getting an error `unsupported keyword argument “sigdigit”`.  
Try with `sigdigits` (plural) as specified in the `run_nca` function ([NCA Docstrings · Pumas](https://docs.pumas.ai/stable/nca_docstrings/#NCA.run_nca-Tuple%7BNCASubject%7D)).

All functions in `NCA.*.jl` uses `sigdigits`, if I am not mistaken.

---

<div class="post-metadata">

**Author:** ![achamzas](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/achamzas/32/339_2.png) [@achamzas](https://discourse.pumas.ai/u/achamzas)\
**Post date:** [February 16, 2023, 4:40pm UTC](https://discourse.pumas.ai/t/error-when-using-sigdigit-in-individual-nca/830/3 "2023-02-16T16:40:29Z")

</div>

Sorry, originally I had tried with sigdigits and was trying different methods to see if it would work. I just tried again with sigdigits and i get the same error.

run\_nca runs correctly using the sigdigits but i see there is a problem when i am trying to use the individual NCA parameters function.

---

<div class="post-metadata">

**Author:** ![storopoli](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/storopoli/32/190_2.png) [@storopoli](https://discourse.pumas.ai/u/storopoli)\
**Post date:** [February 17, 2023, 5:10pm UTC](https://discourse.pumas.ai/t/error-when-using-sigdigit-in-individual-nca/830/4 "2023-02-17T17:10:11Z")

</div>

Since you have a `DataFrame` back from `NCA.vz` function just do a data wrangling step:

```julia
@rtransform! df :var = round(:var; digits=3)

```

where `:var` is the column name of the NCA computation.

---

<div class="post-metadata">

**Author:** ![achamzas](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/achamzas/32/339_2.png) [@achamzas](https://discourse.pumas.ai/u/achamzas)\
**Post date:** [February 17, 2023, 5:15pm UTC](https://discourse.pumas.ai/t/error-when-using-sigdigit-in-individual-nca/830/5 "2023-02-17T17:15:54Z")

</div>

Thank you very much for your help.
