非常感谢大家的回答!
- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input double(w x) byte y
- .9993799844782558 0 1
- .9993799844782558 0 1
- .9993799844782558 0 1
- .9993799844782558 0 1
- .9993800038136472 0 1
- .9993084682257377 0 1
- .9993098803169057 0 1
- .9993107611094899 0 1
- .9993099831400718 0 1
- 1 0 0
- 1 0 0
- 1 1 0
- .9999726114453388 0 0
- .9999726114453388 0 0
- .9999726114453388 0 0
- .9999726114453388 0 0
- .9855912386347621 1 0
- .9855912386347621 1 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- .990649675659052 0 1
- .990649675659052 0 1
- .9915727371407879 0 1
- .9932881358941555 0 1
- .9949661026400637 0 1
- .9951749771087679 0 1
- .99638123264639 0 1
- .99638123264639 0 1
- 1 0 1
- 1 0 0
- 1 0 0
- 1 0 0
- .8917586616656455 0 0
- .8917586616656455 0 0
- .8917586616656455 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- .9043012418332407 0 0
- .9314437976187135 0 0
- .9998485411232476 1 0
- .9998485409856721 1 1
- .9998485409856721 1 1
- .9998485409856721 1 1
- .9998485409856721 1 0
- .9998485414639602 1 1
- .9998485413310303 1 1
- .9998568055132432 1 1
- .9998568056760768 1 1
- 1 1 0
- 1 1 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 1
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 0
- 1 0 1
- 1 0 1
- 1 0 1
- .9966554453547722 1 1
- .9974360862520616 1 1
- .9978329357337956 1 1
- .9978320128844794 1 1
- .997831488995447 1 1
- .997831488995447 1 1
- .997831488995447 0 1
- .997831488995447 0 1
- 1 0 1
- 1 0 1
- 1 0 1
- 1 0 1
- 1 0 1
- 1 0 1
- 1 0 1
- 1 0 1
- 1 0 1
- 1 0 0
- 1 0 1
- 1 0 1
- 1 0 1
- end
- replace w = round(w, 0.`=( strlen("99985681") - 1 ) * "0" + "1"')
- contract _all, freq(count)
- summarize w, meanonly
- local min = round(r(min), 0.1)
- local max = round(r(max), 0.1)
- logit y i.x##c.w [fweight=count], nolog
- margins x, predict(xb) at(w = (`min' `max'))
- margins x, predict(xb) at(w = (`min' `max'))
- margins x, at(w = (`min' `max'))
- margins , at(x=(0 1) w = (`min' `max'))
- margins, dydx(x) at(w = (`min' `max'))