Hello,
I'm trying to display significance stars to the right of composite results (the lower and upper bounds of confidence intervals) using collect machinery. And it seems like -collect stars- doesn't interact with composite results in the same manner as it does with regular collect results, or perhaps I'm misunderstanding how either of those works.
Here's the code I'm running:
It's a minor inconvenience, but still I'd like to learn how to solve this programmatically in Stata rather than move those stars manually in Excel or other software.
Thanks.
I'm trying to display significance stars to the right of composite results (the lower and upper bounds of confidence intervals) using collect machinery. And it seems like -collect stars- doesn't interact with composite results in the same manner as it does with regular collect results, or perhaps I'm misunderstanding how either of those works.
Here's the code I'm running:
Code:
version 18
* version 1 - significance stars next to coefficients - works as expected.
clear all
sysuse auto
collect: reg price c.mpg c.headroom
collect composite define ci = _r_lb _r_ub, trim delimiter(" - ")
collect composite define beta_ci = _r_b ci
collect style cell result[ci], sformat("[%s]")
collect style header result[beta_ci], level(hide)
collect layout (coleq#colname#result[beta_ci] result[_cons r2 N])
collect stars _r_p .05 "*" .01 "**", result attach(_r_b)
collect preview
* version 2 - the goal is to display significance stars to the right of beta_ci composite result, but they are not displayed.
clear all
sysuse auto
collect: reg price c.mpg c.headroom
collect composite define ci = _r_lb _r_ub, trim delimiter(" - ")
collect composite define beta_ci = _r_b ci
collect style cell result[ci], sformat("[%s]")
collect style header result[beta_ci], level(hide)
collect layout (coleq#colname#result[beta_ci] result[_cons r2 N])
collect stars _r_p .05 "*" .01 "**", result attach(beta_ci)
collect preview
Thanks.

Comment