Quantitative covariate that is being balanced within strata in a PSA. If continuous
has three columns, then the second and third are assumed to be the treatment and strata respectively. Missing values are not allowed.
treatment
Binary variable of same length as continuous; generally 0 for 'control,' 1 for 'treatment.'
strata
Integer variable (usually 1 - 5); A vector of same length as continuous indicating the
derived strata from estimated propensity scores. Generally 5 or 6 strata are used, but graph works
reasonably well at least up to 10 strata.
Details
Makes multiple calls to ks.test, returning a vector of p-values associated with strata
from a Propensity Score Analysis.
Value
Returns a vector of same length as the number of strata containing the
p-values from the KS-test of equivalence of distributions for each stratum-treatment
pair.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(PSAgraphics)
Loading required package: rpart
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PSAgraphics/bal.ks.psa.Rd_%03d_medium.png", width=480, height=480)
> ### Name: bal.ks.psa
> ### Title: Kolgomorov-Smirnov 2 sample tests for multiple strata
> ### Aliases: bal.ks.psa
> ### Keywords: htest
>
> ### ** Examples
>
> continuous<-rnorm(1000)
> treatment<-sample(c(0,1),1000,replace=TRUE)
> strata<-sample(5,1000,replace=TRUE)
> bal.ks.psa(continuous,treatment,strata)
[1] 0.5847799 0.6030919 0.8400148 0.9014995 0.3926335
>
>
>
>
>
> dev.off()
null device
1
>