命令简介
confall plots and displays effect estimates from models with all possible combinations of potential confounders.The first independent variable is the exposure of interest and all other independent variables are potential confounders.
命令安装
从SSC安装:
ssc install confall
从Stata Journal安装:
net sj 7-2 st0124 net install st0124.pkg net get st0124.pkg
使用范例
例
webuse lbw,clear logit low age lwt race smoke ptl ht ui,or confall lwt, eform(OR)
命令问题
报错现象:Please wait........{ required
原因探究:Stata7 升级Stata 8时,编程方式有变化( help whatsnew7to8):4. One change will bite you: With if exp, while exp, forvalues, and all the other commands that take a brace, no longer can the open brace and close brace be on the same line as the command. 而confall是老命令,基于Stata7运行[1]。
So because -confall- runs as version 7 and calls -scatter-, it will break on every Stata version since version 9 (or thereabouts).
解决方案
1,定位confall.ado:
which confall
2,根据上面的地址打开confall.ado,如:
doedit "C:\Users\XXX\ado\plus\c\confall.ado"
3,查找,在323行:
scatter `b' `showvar1' `baicm' `bbicm' `b0' `bfull' `xforgr', `saving' `options' `ytitle' `prxlab'
4,替换为:
version 8: twoway scatter `b' `showvar1' `baicm' `bbicm' `b0' `bfull' `xforgr', `saving' `options' `ytitle' `prxlab'
5,保存即可。
联系作者
作者:Zhiqiang Wang
邮箱:z.wang@uq.edu.au
文献:Two Postestimation Commands for Assessing Confounding Effects in Epidemiological Studies. https://sage.cnpereading.com/paragraph/article/?doi=10.1177/1536867X0700700203