- sysuse auto, clear
- regress price c.length##c.mpg
- est store regression
- foreach v of var length mpg {
- sum `v' if e(sample)
- local low_`v' = r(mean)-r(sd)
- local high_`v' = r(mean)+r(sd)
- }
- margins, at(mpg=(`low_mpg' `high_mpg') length=(`low_length' `high_length'))
- marginsplot, xlabel(13 " " `low_mpg' "Low IV" `high_mpg' "High IV" 30 " ") ///
- ytitle("Price") ylabel(2000(1000)9000, angle(0) nogrid) ///
- legend(position(3) col(1) stack) title("") noci ///
- plot1opts(m(Oh) lp(dash)) plot2opts(m(square) lp(dot))
- 想问简单斜率分析如上画出图后再怎么分析
另外因为毕业季查重附加一个零字数的小广告。推荐大家一个靠谱的论文检测平台。重复的部分有详细出处以及具体修改意见,能直接在文章上做修改,全部改完一键下载就搞定了。他们现在正在做毕业季活动, 赠送很多免费字数,可以说是十分划算了!地址是:https://www.*.com/