看了help文件,对margins不同用法对应求出的边际效应还是不太理解,有人能指点下以下几个加粗命令中求的分别是什么边际效应吗?我如果画调节作用图,究竟该如何使用margins?在此谢过
Setup
. webuse nhanes2
Profile plot of margins
. regress bpsystol agegrp##sex
. margins agegrp
. marginsplot
Interaction plot
. margins agegrp#sex
. marginsplot
Contrasts of margins -- effects (discrete marginal effects)
. margins r.sex@agegrp
. marginsplot
Equivalently, using dydx()
. margins agegrp, dydx(sex)
. marginsplot
Plots at specified values of continuous covariates
. logistic highbp sex##agegrp##c.bmi
. margins sex, at(bmi=(10(5)65))
. marginsplot