Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading