Skip to contents

Obtain the EB-rMAP weight corresponding to an observed response in current trial

Usage

wEB(obj, y_obs)

Arguments

obj

"EBrMAP" class object returned by `EB_rMAP` function

y_obs

Observed response in the current trial

Value

A scalar of EB-rMAP weight

Details

`y_obs` for binomial and Poisson outcomes must be an integer.

In the case of normal outcome, `y_obs` is matched to the closest break in `y_range` argument in `EB_rMAP` function, whose corresponding EB-rMAP weight is returned. Rounding issues may cause error occasionally. In this case, jittering `y_obs` might help. For example, try `wEB(obj, 30.001)` if `wEB(obj, 30)` fails.