diff --git a/CLAUDE.md b/CLAUDE.md index 7d9b60a..2a5d3e4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -34,11 +34,11 @@ remotes::install_github("InsightRX/PKPDsim") ### Estimation Methods -The main entry point is `get_map_estimates()` (`R/get_map_estimates.R`), which supports five estimation methods via the `method` argument: +The main entry point is `get_map_estimates()` (`R/get_map_estimates.R`), which supports three estimation methods via the `type` argument (`method` is a separate argument that selects the `optim()` algorithm, e.g. `BFGS`): - `map` — standard MAP Bayesian with empirical Bayes (default) -- `map_flat_prior` — MAP with flattened priors (reduced shrinkage) -- `ls` — Least squares (nearly-flat MAP priors) +- `pls` — MAP with a flattened prior fixed internally to a small value (reduced shrinkage, not controlled by `weight_prior`) +- `ls` — least squares; has no prior/omega term in the objective at all (not a flat-prior MAP special case) and forces the error model to `add = 1, prop = 0` ### Estimation Pipeline diff --git a/README.md b/README.md index 6175250..5fdd9f8 100755 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ MAP Bayesian fitting for PK(PD) models. ## Description -This R library implements various methods for fitting of individual PK(PD) data. For simulation of PK(PD) profiles it uses the `PKPDsim` [package](https://github.com/insightrx/pkpdsim). The following estimation methods are implemented and available in the `get_map_estimates` function: +This R library implements various methods for fitting of individual PK(PD) data. For simulation of PK(PD) profiles it uses the `PKPDsim` [package](https://github.com/insightrx/pkpdsim). The following estimation methods are implemented and available in the `get_map_estimates` function via the `type` argument: -- `map`: MAP Bayesian: standard maximum a priori estimation of empirical Bayes estimates -- `map_flat_prior`: MAP Bayesian with flat prior: reduced weight of prior distribution, i.e. will put more trust in the data and hence reduce shrinkage (user can control the weighting). -- `ls`: Least Squares: not *truly* least squares but rather special case of MAP Bayesian with flat priors, i.e. with (almost) fully flat prior. +- `map`: MAP Bayesian: standard maximum a priori estimation of empirical Bayes estimates. +- `pls`: MAP Bayesian with a flattened prior: the prior weight is fixed internally to a small value (regardless of the `weight_prior` argument), putting more trust in the data and reducing shrinkage relative to `map`. +- `ls`: Least squares: unlike `pls`, this is *not* a flat-prior special case of MAP. The objective function has no prior/omega term at all, and the residual error model is forced to `add = 1, prop = 0` regardless of the `error` argument, so it minimizes unweighted squared residuals. ## Installation