Description Usage Arguments Value Examples
Function for computing the barycenter in the DSC method at a specific time period.
1 |
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. |
weights |
a vector of weights for each control unit; can be calculated by |
evgrid |
a vector of gridpoints used to evaluate quantile functions. |
DSC_bc
returns a list containing the following components:
|
a list of evaluated control unit quantile functions. |
|
a vector of evaluated barycenter. |
1 2 3 4 5 6 7 8 | #simulated data from Gaussian mixture
#ex_gmm() calls the simulated data
#detail can be found by ??ex_gmm
#obtaining the optimal weights
DSC_res=DSC_weights(ex_gmm()$control,ex_gmm()$target, M=100)
weights=DSC_res[[1]]
#obtaining the barycenter
DSC_bc(ex_gmm()$control,weights,seq(from=0,to=1,length.out=1001))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.