# 0. Overview of the package

This vignette provides an overview of `BayesERtools`.

## 0. Analysis workflow & supported model types

Analysis can be performed in the following simple steps.

Supported model types are as follows:

| Binary endpoint | Continuous endpoint
--- | --- | ---
Linear (logit) | Emax (logit) | Linear | Emax
backend | `rstanarm` | `rstanemax` | `rstanarm` | `rstanemax`
reference | 🔗 | 🔗 | 🔗 | 🔗
develop model | ✅ | ✅ | ✅ | ✅
simulate & plot ER | ✅ | ✅ | ✅ | ✅
exposure metrics selection | ✅ | ✅ | ✅ | ✅
covariate selection | ✅ | ❌ | ✅ | ❌
covariate forest plot | ✅ | ❌ | ✅ | ❌
✅ Available, 🟡 In plan/under development, ❌ Not in a current plan

## 1. ER model development

The package provides a set of functions to develop ER models. The following functions are available:

Binary endpoint

- Linear logistic regression:
  - `dev_ermod_bin()`, `dev_ermod_bin_exp_sel()`, `dev_ermod_bin_cov_sel()`
- Emax logistic regression:
  - `dev_ermod_bin_emax()`, `dev_ermod_bin_emax_exp_sel()`

Continuous endpoint

- Linear regression:
  - `dev_ermod_lin()`, `dev_ermod_lin_exp_sel()`, `dev_ermod_lin_cov_sel()`
- Emax model:
  - `dev_ermod_emax()`, `dev_ermod_emax_exp_sel()`

## 2. Simulation from developed ER model

The following functions are available for simulation from developed ER models:

- `sim_er()`
- `sim_er_new_exp()`, `sim_er_curve()`
- `sim_er_new_exp_marg()`, `sim_er_curve_marg()`

## 3. Plot simulated ER curve

Simulated ER curve can be visualized with the following functions:

- `plot_er()`
- `plot_er_exp_sel()`

## Acknowledgement

Figures created with https://www.biorender.com