Getting parameter estimate table

After running NLME model, we can check parameter estimate in FittedPumasModel.

res = fit(mymodel,data,param,Pumas.FOCEI())
julia> res
FittedPumasModel

Successful minimization:                true

Likelihood approximation:        Pumas.FOCEI
Deviance:                          19603.855
Total number of observation records:    1728
Number of active observation records:   1728
Number of subjects:                       24

---------------------
           Estimate
---------------------
tvcl        0.96561
tvv        19.944
tvka        0.9818
Ω₁,₁        0.05888
Ξ©β‚‚,β‚‚        0.063136
Ω₃,₃        0.16558
Οƒ_prop      0.042221
---------------------

Is there a way to get the parameter estimate as a dataframe?

Currently, I don’t think that is supported. I’m interested in knowing why you’d like the estimates as a dataframe. You can extract the estimates to a NamedTuple with coef(res) which I personally think is the more convenient structure for the parameters.

Usually, our final deliverable for parameter estimate is as a table in the report.
The below link is a vignettes of R package nonmemica for creating NONMEM parameter table. I don’t use this package, but it shows why I’m asking the parameter estimates as a data frame.
https://cran.r-project.org/web/packages/nonmemica/vignettes/parameter-table.html

When I try coef(res), I can see parameter estimates as NamedTuple but I don’t have an idea how to manipulate this into table I want.

julia> coef(result)
(TVCL = 2.7907388779868376, TVVC = 47.64457787187141, TVQ = 29.03416096300452, TVVP = 151.70681644475079, Ξ© = PDMats.PDiagMat{Float64,Array{Float64,1}}(4, [0.1467966100709955, 0.17643085438516706, 0.22914868909450084, 0.
18957024013038068], [6.81214640798836, 5.667942852086943, 4.363978707238427, 5.275089588493586]), Οƒ_prop = 0.01900908127024216)
1 Like

Thanks. That was a useful reference. I believe there is ongoing work on supporting export the fit results to e.g. Markdown or HTML. If you had access to similar output functionality as provided by nonmemica directly from a fitted Pumas model, would that solve your problem or would you still need the dataframe for postprocessing?

in general, if you have a NamedTuple, you should be able to convert that to a DatFrame. e.g.

julia> myres = (a = 2, b=3)
(a = 2, b = 3)

julia> DataFrame([myres])
1Γ—2 DataFrame
β”‚ Row β”‚ a     β”‚ b     β”‚
β”‚     β”‚ Int64 β”‚ Int64 β”‚
β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1   β”‚ 2     β”‚ 3     β”‚

However, the problem we have in converting the NamedTuple of our coefficients is that the Omega parameters are an array and are printed with type information, and hence the DataFrame constructor fails on this result. Hopefully, we will be able to get a simple convenience soon.

Thank you @andreasnoack and @vijay.

I think many user has their own preference for this kinds of work. It would be great if Pumas provide nice final output directly with simple one line of function. But some user may prefer their own way of manipulation or post-processing of final result.

NONMEM provide several output files which can be processed outside of NONMEM. In another NLME software Monolix, which is GUI based software and it shows every plot and table after run but those results can be exported as a separate file for further manipulation. For population parameter, Monolix return file populationParameters.txt as below.

parameter,value
ka_pop,1.53264420692351
V_pop,0.455503642172079
Cl_pop,0.0401723641322292
omega_ka,0.67105477569176
omega_V,0.126281479740844
omega_Cl,0.27062337275905
a,0.433279579876172
b,0.0542595263836769

I’m just one of many modelers and I prefer the latter (data frame).