clear set obs 2000 generate age = runiformint(18, 99) generate x = rlogistic(55,1) kdensity x generate wise = x < age tabulate wise tabulate age wise replace x = rlogistic(55, 1/0.2) replace wise = x < age tabulate wise tabulate age wise logit wise age generate female = runiformint(0, 1) replace x = rlogistic(55-female*5, 1/0.2) replace wise = x < age logit wise age i.female margins female, at(age=(50,55)) marginsplot * Cutpoints local fcut = -(_b[_cons]+_b[1.female])/_b[age] display `fcut' local mcut = -(_b[_cons]+_b[0.female])/_b[age] display `mcut' margins female, at(age=(`fcut' `mcut')) quietly margins female, at(age=(18(5)99)) marginsplot replace wise = rlogistic(70+female*(-20), 1/(0.1+female*0.1)) < age logit wise c.age##female margins female, at(age=(50,70)) marginsplot * Cutpoints local fcut = -(_b[_cons]+_b[1.female])/(_b[age]+_b[1.female#c.age]) local mcut = -(_b[_cons]+_b[0.female])/(_b[age]+_b[0.female#c.age]) * Inflection point local equal = -_b[1.female]/_b[1.female#c.age] margins female, at(age=(`fcut' `mcut' `equal')) quietly margins female, at(age=(18(5)99)) marginsplot