# NOT RUN {
data("mortgage")
### Regression Specification
fm <- deny ~ black + p_irat + hse_inc + ccred + mcred + pubrec +
ltv_med + ltv_high + denpmi + selfemp + single + hischl
### Issue the subpop command
set_b <- subpop(fm, data = mortgage, method = "logit", var = "black",
u = 0.1, alpha = 0.1, b = 50)
### Plotting
plot(set_b, varx = mortgage$p_irat, vary = mortgage$hse_inc,
xlim = c(0, 1.5), ylim = c(0, 1.5), xlab = "Debt/Income",
ylab = "Housing expenses/Income", overlap = TRUE)
# }
Run the code above in your browser using DataLab