if (FALSE) {
Y0 <- rnorm(100, 1, 1)
Y1 <- rbeta(100,2,2)
Tx = sample(100) <= 0.5*(100)
# Observed Outcome
Y = ifelse( Tx, Y1, Y0 )
dta <- data.frame(Y = Y, A = as.numeric(Tx))
pKS.GoF<-prepivot.ks.permtest(dta$Y[dta$A==1],dta$Y[dta$A==0],alpha=0.05,B=1000,n.perm = 999)
summary(pKS.GoF)
}
Run the code above in your browser using DataLab