Synthetic Purposive Sampling: Site Selection for External Validity
sps.Rd
Synthetic Purposive Sampling: Site Selection for External Validity
Usage
sps(
X,
N_s,
stratify = NULL,
site_include = NULL,
site_exclude = NULL,
lambda = c(1, 1, 0),
seed = 1234,
max_iter = 10,
solver = "ECOS_BB",
num_iter = NULL
)
Arguments
- X
Site-level variables for the target population of sites. Row names should be names of sites. X cannot contain missing data.
- N_s
Number of study sites to be selected.
- stratify
(Optional. Default =
NULL
) Output from functionstratify_sps()
. This argument helps users incorporate practical and logistical constraints. See examples on http://naokiegami.com/spsR/articles/stratify_sps.html- site_include
(Optional. Default =
NULL
) Names of sites users want to always include (or have already selected).- site_exclude
(Optional. Default =
NULL
) Names of sites users want to always exclude.- lambda
Values of the tuning parameters. If users want to change how to balance three parts of the objective function, they can change
lambda
. Default values arec(1, 1, 0)
. Users who want to fine-tune the tuning parameters, please see the methodological details in Egami and Lee (2023+) (https://naokiegami.com/paper/sps.pdf).- seed
Numeric.
seed
used internally. Default =1234
.- max_iter
Numeric. The number of iterations used in the optimization. Default =
10
.- solver
Solver we use in the internal CVXR optimization. Default =
ECOS_BB
. See the CVXR website for information on other solvers.- num_iter
Numeric. The number of iterations used in the underlying optimization.
Value
sps
returns an object of sps
class.
selected_sites
: Names of sites the SPS algorithm selected.W
: Estimated weights to approximate non-selected sites using selected sites.W
will be used in the subsequent estimation of the average-site ATE.obj
: Estimated values of the objective function, separately for three parts.internal
: Objects useful for internal use of the function.
References
Egami and Lee. (2023+). Designing Multi-Context Studies for External Validity: Site Selection via Synthetic Purposive Sampling. Available at https://naokiegami.com/paper/sps.pdf.