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 tolist_control$cv_typeand 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, andmnl_stable). The defaultlocal_mode = "fast"uses the refined global GPS start:mnl_start = "global",mnl_reltol = .Machine$double.eps,mnl_gradtol = 1e-1, andmnl_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 = FALSEpreserves 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"orwarm_start = TRUEreuses the previous local fit as the next optimizer start.local_mode = "experimental"uses"global_previous". Advanced controlsmnl_maxit,mnl_reltol, andmnl_gradtoltune the local multinomial-logit optimizer.mnl_gradtol = NULLdisables the gradient-norm stopping gate and preserves the original stopping rule.mnl_stable = TRUEuses overflow-safe log-sum-exp optimizer math.