Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compute half life with only two data points #114

Closed
slyrus opened this issue Oct 5, 2019 · 1 comment
Closed

compute half life with only two data points #114

slyrus opened this issue Oct 5, 2019 · 1 comment

Comments

@slyrus
Copy link

slyrus commented Oct 5, 2019

It would be nice if one could compute a half-life from only two points.


This works:

PKNCA::pk.calc.half.life(conc=c(1, 0.5, 0.25),
                         time=c(0, 1, 2),
                         min.hl.points=3,
                         allow.tmax.in.half.life=TRUE,
                         check=FALSE)

but this doesn't:

PKNCA::pk.calc.half.life(conc=c(1, 0.5),
                         time=c(0, 1),
                         min.hl.points=2,
                         allow.tmax.in.half.life=TRUE,
                         check=FALSE)
@billdenney
Copy link
Owner

Thank you for pointing this out. I just fixed it.

The underlying issue had to do with the fact that adjusted r-squared requires 3 points for calculation. Now adjusted r-squared with 2 points or fewer is NA instead of an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants