I'm trying to use a named expression as the values used to attach stars to the coefficients, but I am unable to get it to work.
The values display just fine in the table.
I suspect the issue is that there is some tag that doesn't match, as per this, however, I cannot fathom what tag that would be.
MWE below. Stars don't display using p_named, despite the values showing up in the table, but display just fine for _r_p.
My real named expression is more complex, so simply using _r_p would not be a solution.
Thank you in advance!
The values display just fine in the table.
I suspect the issue is that there is some tag that doesn't match, as per this, however, I cannot fathom what tag that would be.
collect stars requires that the attach() result items must have the same tag elements as the p-value result items for the stars labels to show up
MWE below. Stars don't display using p_named, despite the values showing up in the table, but display just fine for _r_p.
My real named expression is more complex, so simply using _r_p would not be a solution.
Code:
sysuse auto, replace collect clear collect p_named=_r_p: reg mpg weight collect style cell result, nformat(%6.3fc) collect stars p_named 0.01 "***" 0.05 "** " 0.1 "* " 1 " ", attach(_r_b) collect layout (colname) (result[_r_b _r_p p_named]) collect stars _r_p 0.01 "***" 0.05 "** " 0.1 "* " 1 " ", attach(_r_b) collect preview
Comment