| compute_weight_update | R Documentation |
Internal helper used by 'MC_IS_system()' to accumulate the importance sampling sums that are needed for the standard estimator
\hat{p}_f = \frac{1}{n}\sum_i I_i w_i, \qquad
\widehat{\mathrm{Var}}(\hat{p}_f) =
\frac{1}{n}\left(\frac{1}{n}\sum_i I_i w_i^2 - \hat{p}_f^2\right).
Both sums are accumulated in the log domain (log-sum-exp), so that very large or very small weights cannot overflow or underflow.
compute_weight_update(
all_log_w,
all_I_vals,
stability_mode = NULL,
sys_type = NULL,
state
)
all_log_w |
Numeric vector of log-weights for the current batch. |
all_I_vals |
Numeric vector of failure indicators (0/1). |
stability_mode, sys_type |
Not used any more. Kept for compatibility of the call signature. |
state |
List containing the current accumulated sums:
|
This function is internal and not intended to be called directly by users.
Updated 'state' list.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.