library(rpm)
# \donttest{
data(fauxmatching)
fit <- rpm(~match("edu") + WtoM_diff("edu",3),
Xdata=fauxmatching$Xdata, Zdata=fauxmatching$Zdata,
X_w="X_w", Z_w="Z_w",
pair_w="pair_w", pair_id="pair_id", Xid="pid", Zid="pid",
sampled="sampled")
num_women = fit$N*exp(fit$gw)
num_men = fit$N*exp(fit$gm)
pmfW_N <- round(fit$pmfW * num_women)
pmfM_N <- round(fit$pmfM * num_men)
a <- microsimulate(fit, pmfW_N=pmfW_N, pmfM_N=pmfM_N)
# }
Run the code above in your browser using DataLab