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

An option to include R-squared with adj R-squared when choosing lambda_z_n #337

Open
cahn88 opened this issue Nov 28, 2024 · 1 comment
Open

Comments

@cahn88
Copy link

cahn88 commented Nov 28, 2024

My observations and simulations show that adj R-squared criteion chooses bigger lambda_z_n than R-squared. I hope you add an option to choose between R-squared and Adj R-squared as a criterion for lambda_z_n.

Thank you!

Jae

@billdenney
Copy link
Owner

billdenney commented Dec 26, 2024

Thanks for this suggestion. We can definitely implement something like this. To make the request more precise, here are the details that I see:

Instead of using adjusted r^2, use the regular (unadjusted) r^2. That would require:

  1. Make it so that the existing PKNCA.option() of "adjusted.r.squared.factor" allows the value to be NA (that would be done here).
  2. Generalize the function above so that it would work for both regular r-squared and adjusted r-squared (e.g. take in an argument of what type of r-squared it is and modify the messages).
  3. Make a new PKNCA.option() called "r.squared.factor". It would validate the same way as "adjusted.r.squared.factor"
  4. Make pk.calc.half.life() take another parameter r.squared.factor = NULL (just below this line).
  5. Validate that one but not both of the r.squared.factor or adj.r.squared.factor was not NA within pk.calc.half.life().
  6. Change these lines so that either adj.r.squared.factor or r.squared.factor was used.
  7. Add testing for all the new steps above.

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