Description Usage Arguments Value Examples
Function for obtaining the weights in the DSC method at a specific time period.
1 | DSC_weights(controls, target, M = 500, choose_solver = "SCS")
|
controls |
a list or matrix: in list form, each list element contains a vector of observations for the given control unit; in matrix form, each column corresponds to one unit and each row is one observation. |
target |
a vector of observations. |
M |
an integer specifying the number of draws from the uniform distribution for approximating the integral. |
choose_solver |
a solver for the optimization problem; see |
DSC_weights
returns a list containing the following components:
|
a matrix of the optimal weights. |
|
a float of the squared Wasserstein distance between the target and the corresponding barycenter. |
1 2 3 4 | #simulated data from Gaussian mixture
#ex_gmm() calls the simulated data
#detail can be found by ??ex_gmm
DSC_weights(ex_gmm()$control,ex_gmm()$target, M=100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.