Fitted.strata.diff | R Documentation |
This function evaluates the global and local balance by standardized difference or non-standardized difference of covariates after inverse probability weighting (IPW) weighting. The IPW is used for ATE estimation. The global balance is the difference measures calculated in all the subjects. The local balance is the difference measures calculated in each pre-defined local neighborhood.
Fitted.strata.diff(X, Z, ps, weight = NULL, ej, std = "std.diff")
X |
The covariate matrix with the rows corresponding to the subjects/participants and the columns corresponding to the covariates. |
Z |
The binary treatment indicator. A vector with 2 unique numeric values in 0 = untreated and 1 = treated. Note each subject/participant must has a value of the treatment indicator, thus its length should be the same as the number of all subjects/participants. |
ps |
The propensity score used to determine the propensity score (PS) stratified subpopulation in each local neighborhoods. A vector with numeric values greater than 0 and less than 1 with the legnth of the number of all subjects/participants. |
weight |
The IPW weight used for estimating average treatement effect (ATE). It is calculated as Z/ps + (1-Z)/(1-ps), where Z is the treatment indicator and ps is the propensity score. A vector with positive values and the legnth of the number of all subjects/participants. If weight = NULL, the IPW for ATE will be calculated using the input propensity score. The weight will be normalized to sum to 1 within treated/untreated group. weight = NULL by default. |
ej |
The matrix of the local neighborhoods, which contains two columns of positive values greater or equal to 0 and less or equal to 1. The rows of ej represent the neighborhoods. The first column is the start point of the local neighborhoods. The second column is the end point of the neighborhoods. |
std |
The difference measure that evaluating the covariate balance. The default measure "std.diff" is the standardized difference of covariates, which is the difference in weighted means of the two treatment groups, divided by the pooled weighted standard deviation expressed as a percentage. The measure "std.norm" is the difference in weighted means of the two treatment groups. "std" can only take values of "std.diff" or "std.norm". |
The matrix whose each column representing the difference measure for each covariates. The first row represents the global balance. The rest of the row represents the local balance corresponding to the local neighborhoods. The global or local balance are standardized difference of each covariate in the whole or propensity score stratified (PS-stratified) sub-populations, and expressed as a percentage.
Li, L. and Greene, T. (2013) A weighting analogue to pair matching in propensity score analysis. The International Journal of Biostatistics, 9, 215-234.
KS = Kang_Schafer_Simulation(n = 2000, seeds = 5050) # Define local neighborhoods ej = cbind(seq(0,0.7,0.1),seq(0.3,1,0.1)) print(ej) # Misspecified propensity score model require(CBPS) Z = KS$Data[,2] X = KS$Data[,7:10] cbps.fit = CBPS(Z~X, ATT = 0, method = "exact") # Global and local balance of CBPS estimated propensity score Fitted.strata.diff(X = X, Z = Z, ps = cbps.fit$fitted.values, weight = cbps.fit$weights, ej = ej, std = "std.diff") # Global and local balance of the true propensity score true.ps = KS$Data[,11] Fitted.strata.diff(X = X, Z = Z, ps = true.ps, ej = ej, std = "std.diff")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.