| .fps_compute_weights | R Documentation |
Estimates functional propensity score (FPS) weights by maximising the empirical likelihood subject to covariate-balancing constraints and solving the resulting dual problem. The dual reduces to minimising log(sum_i exp(-theta' g_i)) over the unconstrained parameter vector theta, where g_i = [A_i, C_i, vec(A_i C_i')] stacks the balancing moments. The optimisation is solved via the BFGS quasi-Newton algorithm and uses the log-sum-exp trick for numerical stability.
.fps_compute_weights(
treat_scores,
conf_matrix,
normalize = TRUE,
tol = 1e-08,
maxit = 1000
)
treat_scores |
n x L numeric matrix of FPC scores for the treatment. |
conf_matrix |
n x p numeric matrix of confounders (scalar + FPC scores of functional covariates). |
normalize |
Logical. If TRUE (default), standardise A and C before building g_i. |
tol |
Relative convergence tolerance for |
maxit |
Maximum number of BFGS iterations (default 1000). |
A named list:
weights |
Numeric vector of length n. Positive, sums to 1. |
theta |
Optimal dual parameter vector. |
convergence |
Convergence code from |
value |
Optimal dual objective value. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.