Skip to contents

GPS estimation via local polynomial logistic regression

Usage

locpol_ps_fit(
  dp,
  bws = NULL,
  cv_method = "cv.ml",
  lp_type = "logit",
  cv_type = NULL,
  list_control = list(n_start = 3, ps_min = 1e-05, lp_order = 1)
)

Arguments

dp

Data list (see dgps_did).

bws

Optional bandwidths.

cv_method

Cross-validation method.

lp_type

Local polynomial type.

cv_type

Cross-validation type ("loocv" or "rcv"). If NULL, fall back to list_control$cv_type and otherwise default to "loocv".

list_control

List with control options (e.g., n_start, ps_min, lp_order, bw_init, bw_seed, bw_upper_cont, n_threads, rcv_train_frac, normalize_ps, warm_start, local_mode, mnl_start, mnl_maxit, mnl_reltol, mnl_gradtol, and mnl_stable). The default local_mode = "fast" uses the refined global GPS start: mnl_start = "global", mnl_reltol = .Machine$double.eps, mnl_gradtol = 1e-1, and mnl_maxit = 1000. It starts each local fit from one global parametric multinomial logit and is usually more stable than chaining local fits. Fitted GPS rows are clipped and, by default, normalized so each row is a valid four-cell probability vector. normalize_ps = FALSE preserves clipped-but-not-renormalized fitted values and is intended only for replication or sensitivity audits. mnl_start = "zero" selects the cold-start optimizer with the same probability-normalization default. local_mode = "previous" or warm_start = TRUE reuses the previous local fit as the next optimizer start. local_mode = "experimental" uses "global_previous". Advanced controls mnl_maxit, mnl_reltol, and mnl_gradtol tune the local multinomial-logit optimizer. mnl_gradtol = NULL disables the gradient-norm stopping gate and preserves the original stopping rule. mnl_stable = TRUE uses overflow-safe log-sum-exp optimizer math.

Value

List with fitted values, bandwidths, bandwidth-search diagnostics, and GPS optimizer diagnostics.