我引导自己的p值进行回归,现在需要将它们添加到我的esttab表中。理想情况下,我希望p值出现在系数点估计值的正下方。虽然我可以将新的p值放入我的表格中,但如果它们是带有标签c1、c2等的新的点估计,它们就会出现在表格中。
下面是相关的简化代码(在回归之后),其中引导的p值位于本地newpvalue中
matrix pval = (`newpvalue')
estadd matrix Puse = pval
esttab , replace cells(b(star fmt(3)) Puse(fmt(3) par) ) 这段代码生成标准表,但p值比系数估计值低几个空格。非常感谢你的帮助,如果问题不清楚,请告诉我。
发布于 2014-10-15 02:35:27
一个可能有帮助的示例(使用行内注释):
clear
set more off
*----- example data -----
sysuse auto
keep price weight mpg
*----- what you want -----
//regress and store
reg price weight mpg
eststo m1
// create matrix of "scalars"
matrix s = (2.1 , 2.4 , 3.2)
// rename matrix columns to coincide with those of regression
mat colnames s = weight mpg _cons
// add
estadd matrix s
// print
estout m1, cells(b s)非常类似于:Stata: combining regression results with other results,但请注意最后一行代码中没有引号。
https://stackoverflow.com/questions/26366880
复制相似问题