powered by
sb(p,x,s)
# check spatial balance set.seed(1234567); N = 500; n = 70; p = rep(n/N,N); X = cbind(runif(N),runif(N)); # select lpm1 sample s = lpm1(p,X); # calculate balance B = sb(p,X,s);
Run the code above in your browser using DataLab