Stata 将depvar控制平均值添加到回归表输出
这是一项两组随机对照试验。在我的回归输出中,我想评估治疗组患者疾病风险的相对降低。为了使这个评估更容易,我想将因变量控制平均值添加到回归表输出的底部。我目前正在将Stata 将depvar控制平均值添加到回归表输出,stata,Stata,这是一项两组随机对照试验。在我的回归输出中,我想评估治疗组患者疾病风险的相对降低。为了使这个评估更容易,我想将因变量控制平均值添加到回归表输出的底部。我目前正在将estadd与estout一起使用。下面是我的代码,它显示了因变量的平均值,但是我找不到任何estadd、estpost等选项,允许我仅对研究的一个组(即对照组)限制depvar平均值计算 estadd,eststo,等等)提供的出色功能让您大吃一惊。这个怎么样: xi: quietly reg X `covariates' if su
estadd
与estout
一起使用。下面是我的代码,它显示了因变量的平均值,但是我找不到任何estadd
、estpost
等选项,允许我仅对研究的一个组(即对照组)限制depvar平均值计算
estadd
,eststo
,等等)提供的出色功能让您大吃一惊。这个怎么样:
xi: quietly reg X `covariates' if survid==1, vce(cluster id1)
// two prefixes in the same command is like a sentence with three subordinate clauses
// that just rolls from one line to the next without giving you a chance to
// catch a breath and really understand what is going on in this sentence,
// which is a sign of poor writing skills, unless you are Dostoevsky, which I am not.
estimates store CtrlArm
// it is also a good idea to be specific about what it is that you want to output.
// Thus I have the -estimates store- on a separate line with a specific name for your results.
summarize X if survid==1
estadd scalar ymean = r(mean)
estout CtrlArm using $outdir\results.txt, ...
estadd
和estout
是不可避免的。您的首字母eststo
的标题为空,但这只占用了空间,没有任何帮助。您被estadd
,eststo
等提供的奇妙功能所宠坏了:)。这个怎么样:
xi: quietly reg X `covariates' if survid==1, vce(cluster id1)
// two prefixes in the same command is like a sentence with three subordinate clauses
// that just rolls from one line to the next without giving you a chance to
// catch a breath and really understand what is going on in this sentence,
// which is a sign of poor writing skills, unless you are Dostoevsky, which I am not.
estimates store CtrlArm
// it is also a good idea to be specific about what it is that you want to output.
// Thus I have the -estimates store- on a separate line with a specific name for your results.
summarize X if survid==1
estadd scalar ymean = r(mean)
estout CtrlArm using $outdir\results.txt, ...
estadd
和estout
是不可避免的。但是,您的初始标题为空的eststo
只会占用空间,没有任何帮助。欢迎访问该网站。我用代码格式让你的问题看起来更漂亮。欢迎来到这个网站。我用代码格式使你的问题看起来更漂亮。