Title: | Stratified Covariate Balancing |
---|---|
Description: | Performs Stratified Covariate Balancing with Markov blanket feature selection and use of synthetic cases. See Alemi et al. (2016) <DOI:10.1111/1475-6773.12628>. |
Authors: | Farrokh Alemi <[email protected]> , Amr ElRafey <[email protected]> |
Maintainer: | Amr ElRafey <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.3.0 |
Built: | 2024-11-28 06:36:50 UTC |
Source: | CRAN |
This is the main function which perfroms Stratified Covariate Balancing. It also enables the user to opt for stratifying only the parents in the Markov Blanket of the Treatment variable along with discretization and use synthetic cases to match the data.
stratify(Treatment, Outcome, Matrix, Discretize, Synthetic, Ordered , Markov)
stratify(Treatment, Outcome, Matrix, Discretize, Synthetic, Ordered , Markov)
Treatment |
The column number of the Treatment variable |
Outcome |
The column number of the outcome variable |
Matrix |
The name of the data.frame or matrix where the data is stored |
Discretize |
A TRUE/FALSE parameter indicating whether covariates should be discretized or not |
Synthetic |
A TRUE/FALSE parameter indicating whether synthetic matching should be used or not |
Ordered |
A TRUE/FALSE parameter indicating whether the variables provided are ordered or not |
Markov |
A TRUE/FALSE parameter indicating whether Markov Blanket of the treatment should be used for rstratification or not |
#create snthetic data m=matrix(nrow=100,ncol=5,data=0) for(i in 1:ncol(m)){ m[,i] = rbinom(100,1,0.5) } colnames(m)=c("Var1" , "Var2" , "Var3" , "var4" , "Var5") ## Now use Stratify g=stratify(4,5,m)
#create snthetic data m=matrix(nrow=100,ncol=5,data=0) for(i in 1:ncol(m)){ m[,i] = rbinom(100,1,0.5) } colnames(m)=c("Var1" , "Var2" , "Var3" , "var4" , "Var5") ## Now use Stratify g=stratify(4,5,m)