combomarginsplot
Stata社区命令
概述
combomarginsplot,缩写combomp,是一款专用于将多次调用margins命令后保存的边际效应结果整合为单一图形的Stata社区命令,便于直观对比不同模型设定、子样本或条件下的边际效应趋势。
依赖
Stata 16 及以上
安装
二选一
ssc install combomarginsplot, replace cnssc install combomarginsplot, replace
示例
sysuse auto
oprobit rep78 i.foreign mpg price weight
margins foreign, at(mpg=(10(5)50)) predict(outcome(3)) saving(file1, replace)
oprobit rep78 i.foreign mpg
margins foreign, at(mpg=(10(5)50)) predict(outcome(3)) saving(file2, replace)
oprobit rep78 i.foreign mpg gear
margins foreign, at(mpg=(10(5)50)) predict(outcome(3)) saving(file3, replace)
combomarginsplot file1 file2 file3, labels("Full model" "Restricted model" "Gear Model") noci作者
姓名:Nicholas Winter
机构:University of Virginia, USA
邮箱:nwinter@virginia.edu