Function for obtaining the weights in the DiSCo method at every time period
DiSCo_weights_reg(
controls,
target,
M = 500,
qmethod = NULL,
qtype = 7,
simplex = FALSE,
q_min = 0,
q_max = 1
)
Vector of optimal synthetic control weights
List with matrices of control distributions
Matrix containing the target distribution
Integer indicating the number of control quantiles to use in the DiSCo method. Default is 1000.
Character, indicating the method to use for computing the quantiles of the target distribution. The default is NULL, which uses the quantile
function from the stats package.
Other options are "qkden
" (based on smoothed kernel density function) and "extreme
" (based on parametric extreme value distributions).
Both are substantially slower than the default method but may be useful for fat-tailed distributions with few data points at the upper quantiles. Alternatively, one could use the q_max option to restrict the range of quantiles used.
Integer, indicating the type of quantile to compute when using quantile
in the qmethod
argument.
The default 7. See the documentation for the quantile
function for more information.
Logical, indicating whether to use to constrain the optimal weights to the unit simplex. Default is FALSE, which only constrains the weights to sum up to 1 but allows them to be negative.
Numeric, minimum quantile to use. Set this together with q_max
to restrict the range of quantiles used to construct the synthetic control.
Default is 0 (all quantiles). Currently NOT implemented for the mixture
approach.
Numeric, maximum quantile to use. Set this together with q_min
to restrict the range of quantiles used to construct the synthetic control.
Default is 1 (all quantiles). Currently NOT implemented for the mixture
approach.
Estimate the optimal weights for the distributional synthetic controls method. solving the convex minimization problem in Eq. (2) in gunsilius2023distributional;textualDiSCos.. using a regression of the simulated target quantile on the simulated control quantiles, as in Eq. (3), \(\underset{\vec{\lambda} \in \Delta^J}{\operatorname{argmin}}\left\|\mathbb{Y}_t \vec{\lambda}_t-\vec{Y}_{1 t}\right\|_2^2\). For the constrained optimization we rely on the package pracma the control distributions can be given in list form, where each list element contains a vector of observations for the given control unit, in matrix form; in matrix- each column corresponds to one unit and each row is one observation. The list-form is useful, because the number of draws for each control group can be different. The target must be given as a vector.