# Calculate PK param. using TIBCO Spotfire?

Somedays ago,my colleague asked me how to calculate PK parameters in TIBCO Spotfire ?
Hmm. That’s sounds difficult, because Spotfire is not tool for analyse DMPK data.
But, there are some packages in CRAN for DMPK. So I thought that using TERR, some PK params could calculate.
Let’s do it. ;-)
At first I installed ‘PK’ packages from source into TERR.

To install ‘PK’ package, is easy.
2nd step launch TERR command prompt, and type “install.packages(‘PK’)”
That’s all !
If successful, you can call PK package using ‘liblary(‘PK’)’

Next, register data-function to spotfire.
# I wrote in my MAC BOOK(not installed spotfire), so there are no screen shot. #
Following function is very simple. The function calculate AUC, MRT, etc. using non-compartmental estimation.
I named following function ‘pk_nan’.

```library('PK')
res <- nca(conc, time, n.tail=3, dose=0, method="z", conf.level=0.95,nsample=1000, design="ssd" )
result <- data.frame( res\$CIs )
result[' name '] <- row.names(result)
```

And set input data …
conc => column( real )
time => column( real )
Also set output data …
result => datatable # that means user can get data as new data table.

Finally run test.
Prepare data sample csv or excel format and load data to spotfire.
e.g.
time 1, 1, 2, 2, 4, 4, 8, 8, 24, 24
conc 2790, 3280, 4980, 7550, 5500, 6650, 2250, 3220, 213, 636

Then insert data function..
May new datatable has following data.
est
95% CI for the AUC to tlast using a z distribution 5.988600e+04
95% CI for the AUC to infinity using a z distribution 6.301882e+04
95% CI for the AUMC to infinity using a z distribution 4.918245e+05
95% CI for the Mean residence time using a z distribution 7.804406e+00
95% CI for the non-compartmental half-life using a z distribution 5.409602e+00
95% CI for the Clearance using a z distribution 0.000000e+00
95% CI for the Volume of distribution at steady state using a z distribution 0.000000e+00
….

Summary.
Tibco spotfire can calculate PK param indirectly using TERR.
I’m not charge of DMPK, and I think winnonline or another tools are used DMPK analysis.
This usage is limited for test.

## 2 thoughts on “Calculate PK param. using TIBCO Spotfire?”

1. Hi There,

Nice to be visiting your blog again, it has been months for me. Well this article that i’ve been waited for so long.

Currently, we are manually starting up our Interior and Exterior servers and I have the task of scripting that startup in Red Hat Linux 5/6/7 and then being able to validate that startup.
Is there documentation available documentation available for this, or has someone created a method and could direct me to a way to handle this task?
I have basic knowledge of TIBCO, including some installation, but my primary job is supporting the entire infrastructure TIBCO lives in not the day to day operations. So I may have missed some areas in the documentation that are pertinent to my question.
I have to assume that whatever tasks happen in the GUI have underlying code or scripts that could be deployed in an automated fashion.
THANK YOU!! This saved my butt today, I’m immensely grateful.