Inverse probability Sample Weights in R

Below is the R code from the “Generalizing Evidence from Randomized Trials using Inverse Probability of Sampling Weights” Paper published by Dr. Buchanan.

Due to security restrictions the code is in a .txt file which can be copied into R

Inverse probability Sample Weights