I am attempting to produce a graph using marginsplot for a categorical variable with three categories. When marginsplot produces the graph, however, the values are listed in the legend instead of the value labels. I attempted to correct this with the syntax in the last line of code below, but no luck:
margins, dydx(lender) at(MinPopPerc = (0 (5) 100))
marginsplot, yline(0) ///
title ("Difference in Predicted Probability of Approving Loan by Tract Racial Composition & Lender", size(small)) ///
subtitle ("Controlling for income, loan amount, year, sex, tract % minority", size(Small)) ///
ytitle ("Difference in Probability of Approval compared to SFCU") ///
xtitle ("Percent Minority in Tract", size(vsmall)) ///
caption ("Source: 2010-2014 HMDA data") ///
legend (label(2 "Comparison Lenders") label(3 "Other Lenders"))
Can anyone suggest a solution?
I did not see this elsewhere, I apologize if I overlooked an answer to this question.
margins, dydx(lender) at(MinPopPerc = (0 (5) 100))
marginsplot, yline(0) ///
title ("Difference in Predicted Probability of Approving Loan by Tract Racial Composition & Lender", size(small)) ///
subtitle ("Controlling for income, loan amount, year, sex, tract % minority", size(Small)) ///
ytitle ("Difference in Probability of Approval compared to SFCU") ///
xtitle ("Percent Minority in Tract", size(vsmall)) ///
caption ("Source: 2010-2014 HMDA data") ///
legend (label(2 "Comparison Lenders") label(3 "Other Lenders"))
Can anyone suggest a solution?
I did not see this elsewhere, I apologize if I overlooked an answer to this question.
Comment