billdenney / pknca

An R package is designed to perform all noncompartmental analysis (NCA) calculations for pharmacokinetic (PK) data.
http://billdenney.github.io/pknca/
GNU Affero General Public License v3.0
67 stars 24 forks source link

AUClast/inf no output starting at Time point 0 #207

Closed Minshi-Lan closed 1 year ago

Minshi-Lan commented 1 year ago

Hi Billdenney,

When I using PKNCA to calculate AUC, something went wrong. I have a oral administration dataset, which means at time point 0, the concentration should be 0. when I calculate the AUC from Time 0 to inf or any else time point, AUClast or AUCinf could not be output and I got warning like this :

Requesting an AUC range starting (0) before the first measurement (3) is not allowed.

Could u please tell me how to figure this out ?

Thanks a lot. BW Minshi

Brief description of the problem

# insert reprex here
billdenney commented 1 year ago

Hi @Minshi-Lan,

Thanks for your interest in PKNCA.

When you do not have a time 0 concentration measurement, PKNCA does not impute the concentration without specific instructions on how to impute it. What you'll want is to use PKNCA_impute_method_start_conc0 as described in the imputation vignette: http://billdenney.github.io/pknca/articles/v08-data-imputation.html

Can you please let me know if that solves the issue for you? If not, I always want to improve the documentation, when confusing. Can you please let me know what is not clear in the vignette?

Minshi-Lan commented 1 year ago

Dear Billdenney,

Thanks for ur quick respond and the work for PKNCA package (grateful for this). I tried the setting the PKNCA_impute_method and it works. And I have another problem when I handling my own dataset:

I use PKNCA.set.summary( ), and I found the “description” argument is missed in the examples in package help file. (The file popped up when I enter "? PKNCA.set.summary” in R Studio.) My code is shown below:

PKNCA.set.summary(name=c("auclast", "cmax", "tmax", "half.life", "aucinf.pred"), description = "Geometric mean ", point=median_na, spread=quantprob_na, rounding=list(signif=3))

However, I could not find the output of half.life. I tried to use “half_life” instead, an error occurred. Is there anything else that I should specify in default option ?

Sorry for keep asking you these stupid questions.

BW Minshi.

billdenney commented 1 year ago

@Minshi-Lan, I'm not certain what you're expecting or how you're getting the results. If it's possible to share the code you're using, I'd be more able to help.

If you want the half-life, you will need to add it to the interval specification (the PKNCAdata() intervals argument). When you set PKNCA.set.summary(), you change how requested parameters are summarized, but you don't change what parameters are requested.

As for missing description argument, I'm not sure what you're looking at. When I ran ?PKNCA.set.summary in my R session, the description argument shows up in both the argument list and the example. (It's also in the reference website: http://billdenney.github.io/pknca/reference/PKNCA.set.summary.html .) Can you please share a screen shot of where it's missing.

billdenney commented 1 year ago

@Minshi-Lan, also, I appreciate all questions. They have several benefits:

  1. They help me understand where the package is confusing to others. That can help me make it easier to use or to make the documentation better.
  2. They help others who don't ask questions (who definitely have the same questions) see the answers.
  3. They help show interest in the package by more people.

Please keep asking!

Minshi-Lan commented 1 year ago

Dear Bill,

Sorry about the wrong info. When I followed the code on the Quick start Chapter, using PKNCA.set.summary( ) function, it came up an error reads that description argument is missing. [cid:426C73BC-443F-4E0F-93D7-9DA186D57FE7] Below is the example from R studio help file :

[cid:054EC234-9EA2-4EDF-B6CE-E26C14E487FB]

Besides, I wonder, could I summarise others parameters such as Volume of distribution & clearance with AUC parameter at once using PKNCA.set.summary( ) ?

BTW, as a new learner, when I ran the below code, no result was output.

PKNCA.set.summary(name="cmax", point=business.geomean, spread=business.geocv, rounding=list(signif=3))

I think PKNCA.set.summary( ) should be used together with summary.PKNCAresultshttp://127.0.0.1:61218/help/library/PKNCA/help/summary.PKNCAresults( ) function ? Don’t know whether I missed some information, if you add summary.PKNCAresultshttp://127.0.0.1:61218/help/library/PKNCA/help/summary.PKNCAresults( ) after PKNCA.set.summary( ) it might be easier to understand ?

BW Minshi

billdenney commented 1 year ago

I have updated the quickstart vignette so that the PKNCA.set.summary() code works. I think that overall, you may find the theophylline example more interpretable for getting started: http://billdenney.github.io/pknca/articles/v02-example-theophylline.html