View source: R/other-functions.R
| fn.loop | R Documentation |
Iterative optimization loop for FLEXOR
fn.loop(
start_theta_z,
start_gamma_s,
data,
parm,
FUN,
FUN2,
tol = 0.001,
optim.maxit = 2,
loop.maxit = 50
)
start_theta_z |
Initial group probabilities (fixed during optimization) |
start_gamma_s |
Initial study probabilities (optimized) |
data |
Structured data list |
parm |
Parameter list with propensity scores |
FUN |
Objective function to minimize (typically fn.ESS_FLEXOR) |
FUN2 |
Weight calculation function (typically fn.Omnibus) |
tol |
Convergence tolerance for relative ESS change (default: 1e-3) |
optim.maxit |
Maximum iterations for optim() per loop (default: 2) |
loop.maxit |
Maximum outer loop iterations (default: 50) |
Updated parm with:
wt.v - Optimized weights
ESS - Final effective sample size
gamma_s - Optimized study probabilities
theta_z - Group probailities (unchanged)
count - Number of iterations performed
change - Final relative ESS change
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.