I have no problem adding confidence intervals from mean to dtable, but I am unable to add them from stci:
and the result is:
rather than:
I would be grateful for any advice on what I am doing wrong. Ideally I only want the group variables and not the total.
Thanks.
Julie
Code:
webuse page2, clear
sort group
dtable time, by(group, nototal)
by group: collect: stci, by(group)
collect composite define _r_ci = _r_lb _r_ub, trim
collect style cell result[_r_ci], sformat("[%s]")
collect style autolevels result _r_ci
collect layout (colname) (group#result)
collect preview
Code:
. collect preview
--------------------------------------
group
1 2
--------------------------------------
time 215.526 (36.127) 239.190 (52.347)
--------------------------------------
Code:
. stci, by(group)
Failure _d: dead
Analysis time _t: time
| Number of
group | subjects 50% Std. err. [95% conf. interval]
-------------+-------------------------------------------------------------
1 | 19 216 7.661029 190 234
2 | 21 233 3.081611 232 280
-------------+-------------------------------------------------------------
Total | 40 232 2.562933 213 239
Thanks.
Julie

Comment