st: RE: RE: RE: RE: RE: RE: RE: -powercal-

Thanks very much Roger!
Tim
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Newson, Roger
B
Sent: 13 February 2007 22:25
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: RE: RE: RE: RE: RE: -powercal-
PS The variance of the binomial influence function should (of course) be
derived by dividing the variance of the Bernoulli influence function by
the binomial total, not by multiplying the variance of the Bernoulli
influence function by the binomial total as stated in my previous email.
(Sorry for any confusion caused.)
Best wishes
Roger
Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group National Heart and Lung
Institute Imperial College London Royal Brompton campus Room 33,
Emmanuel Kaye Building 1B Manresa Road London SW3 6LR UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
www.imperial.ac.uk/nhli/r.newson/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Newson, Roger
B
Sent: 13 February 2007 21:30
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: RE: RE: RE: RE: -powercal-
Hi Tim
I presume that your statement
a01 = -1/3, a02 = -2/9, a03 = -4/9
a11 = 1/3, a12 = 2/9, a03 = 4/9
should actually read
a01 = -1/3, a02 = -2/9, a03 = -4/9
a11 = 1/3, a12 = 2/9, a13 = 4/9
(ie I presume that the second a03 is a typo and should be a13).
Apart from this apparent typo, the only inconsistency that I can see is
that you are defining delta assuming the logit link (ie estimating
ratios between odds), and then defining the sigma_squared_j assuming the
identity link (ie estimating differences between proportions). If we
consistently use the identity link, then we define delta to be equal to
delta = 0.8 - 0.5 = 0.3
and define the sigma_squared_j as you have done (similarly to the
squares of the entry in Row 7 of Table 3, but multiplying by the
binomial total). On the other hand, if we consistently use the logit
link, then we define delta as you have done, and define the
sigma_squared_j by multiplying the squared entry in Row 9 of Table 3 by
the binomial total.
I hope this helps.
Best wishes
Roger
Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group National Heart and Lung
Institute Imperial College London Royal Brompton campus Room 33,
Emmanuel Kaye Building 1B Manresa Road London SW3 6LR UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
www.imperial.ac.uk/nhli/r.newson/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Mak, Timothy
Sent: 13 February 2007 16:08
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: RE: RE: RE: -powercal-
Hi Roger,
I've downloaded your document, and I think I understand it. However just
to make sure it would be much appreciated if you could check I'm doing
the right thing.
Proposed test: Difference in proportion between two groups in actual
attendance (compliance), with about 60% prescribed to attend 3 sessions,
20% 6 sessions, and 20% 12 sessions. Need to calculate sample size for
90% power.
In the usual Binomial regression, odds are used instead of proportion,
so in effect we're testing odds.
So delta = logit(0.8) - logit(0.5)
because in our treatment group, we expect 80% compliance, and control
group 50% compliance.
Standard deviation of influence function is calculated by formula 19.
Each CSU is taken to have 10 PSU divided into 6 groups, treatment and
control each having 3 groups (5 PSU). Allocate the following indicator:
Control, 3 sessions: 01 (011, 012, 013)
Control, 6 sessions: 02
Control, 12 sessions: 03
Treatment, 3 sessions: 11 (111, 112, 113) Treatment, 6 sessions: 12
Treatment, 12 sessions, 13
For each CSU, p0, the overall proportion in the control group, will be
estimated by (p011 + p012 + p013 + p02 * 2 + p03 * 4)/9, to take into
account of the weighting.
Similarly, p1 will be estimated by: (p111 + p112 + p113 + p12 * 2 + p13
* 4)/9
And therefore the a_j parameters are as follows:
a01 = -1/3, a02 = -2/9, a03 = -4/9
a11 = 1/3, a12 = 2/9, a03 = 4/9
The sigma_squared_j are as follows:
s2_01 = 3*.5*.5
s2_02 = 6*.5*.5
s2_03 = 12*.5*.5
s2_11 = 3*.2*.8
s2_12 = 6*.2*.8
s2_13 = 12*.2*.8
And the m_j are as follows:
m01=3
m02=1
m03=1
m11=3
m12=1
m13=1
Using these figures, I calculated delta = 1.3862944, and sdinf =
1.0671874
But of course the calculations are assuming the group sizes are fixed.
The 60%, 20%, and 20% are simply our predicted distribution, but I guess
we can't allow for the random fluctuation in these group sizes without
running a simulation...
Thanks,
Tim
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Newson, Roger
B
Sent: 09 February 2007 19:13
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: RE: RE: -powercal-
You can't really translate that into a z-test, as a z-test (and the
corresponding confidence interval) tests hypotheses on one parameter,
not on two parameters. I suspect that, in your case, the one parameter
that you really wanted to know was either the difference between the two
proportions, or the ratio between those two proportions, or the ratio
between the corresponding odds. These can all be regarded as special
cases of either generalized linear models or Somers' D, and therefore
are covered by the formulas in Newson (2004).
I hope this helps.
Best wishes
Roger
Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group National Heart and Lung
Institute Imperial College London Royal Brompton campus Room 33,
Emmanuel Kaye Building 1B Manresa Road London SW3 6LR UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
www.imperial.ac.uk/nhli/r.newson/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Mak, Timothy
Sent: 09 February 2007 17:41
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: RE: -powercal-
Hi Roger,
My hypothesis is that the proportion of attendance for the control group
is 0.5, and the proportion for the experimental group is 0.8. How do you
translate that into a z-test?
Thanks,
Tim
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Newson, Roger
B
Sent: 09 February 2007 14:44
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: -powercal-
I think you probably could use -powercal- to do these power
calculations. The formulas are given in Newson (2004). However, to use
these formulas, you must first specify the kind of effect you intend to
measure (eg a ratio between proportions or a difference between
proportions or a difference between odds), and the groups you intend to
compare. These specifications not clear from your email (quoted below).
I hope this helps.
Best wishes
Roger
References
Newson R. Generalized power calculations for generalized linear models
and more. The Stata Journal 2004; 4(4): 379-401. Download
pre-publication draft from http://www.imperial.ac.uk/nhli/r.newson/
Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group National Heart and Lung
Institute Imperial College London Royal Brompton campus Room 33,
Emmanuel Kaye Building 1B Manresa Road London SW3 6LR UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
www.imperial.ac.uk/nhli/r.newson/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Mak, Timothy
Sent: 09 February 2007 14:06
To: statalist@hsphsun2.harvard.edu
Subject: st: -powercal-
Hi all,
I would like to use calculate sample size for an RCT whose outcome will
be assessed by Binomial regression. Basically it's the proportion of
treatment sessions that are attended. Some will be assigned 3 sessions,
some 6, and some 12. Say the proportions are 60%, 20%, and 20%. Assuming
equal proportion between treatment and control group, I wonder if I
could use -powercal- to do the calculations instead of running a
simulation.
Help would be much appreciated.
Tim
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/