Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Using SAMPSI for repeated observations


From   Ron�n Conroy <[email protected]>
To   [email protected]
Subject   Re: st: Using SAMPSI for repeated observations
Date   Thu, 23 Feb 2006 11:27:18 +0000

On 22 Feabh 2006, at 22:59, Matt G wrote:

However, there's a gap - no apparent way of
calculating the sample size for a two-group comparison
of PROPORTIONS where there are repeated observations
in time.
Your outcome variable here is change over time in a binary variable. For this reason, people who don't change are uninformative. Your hypothesis is that the proportion of the changers who change in one direction (say from 0 to 1) is greater in population 1 than in population 2.

1. What proportion of changers in the control or reference population will change in the direction of interest?
2. What is the smallest difference in this proportion that would be of practical significance?
3. Calculate the sample size for two independent proportions.

Now is the awful bit!

4. What proportion of the population will change (in any direction)?
5. Divide the sample size by this proportion (essentially, multiply by 1/proportion)

Example
We want to see if getting an alternative medicine practicioner to give the lecture on alternative medicine will have a more beneficial effect on student attitudes than getting a doctor to do it.

1. We suspect that 60% of those who change their view of alternative medicine following a lecture from a doctor will improve their view
2. We would regard a change of 75% as bigger than this in real life terms.
3. Sample size needed for 0.6 versus 0.75 in two groups is

. sampsi 0.6 0.75, pow(.9)

Estimated sample size for two-sample comparison of proportions

Test Ho: p1 = p2, where p1 is the proportion in population 1
and p2 is the proportion in population 2
Assumptions:

alpha = 0.0500 (two-sided)
power = 0.9000
p1 = 0.6000
p2 = 0.7500
n2/n1 = 1.00

Estimated required sample sizes:

n1 = 216
n2 = 216

So we need to get two groups of 216 students (= 432) who change their opinions.

4. What proportion of students will change their opinions after the lecture? We might guess that as few as 40% will - people tend to have made their minds up about alternative medicine before you give your lecture!
5. So to recruit 432 students who change their opinions, we will need

. di 432/.4
1080

1080 students.

That's a lot.

Note that participants who do not change status from one follow-up to the next are uninformative. You have to inflate the sample size you get from Stata to account for these uninformative cases.

Note: -sampsi- routinely gives 90% power. I needn't have included it in the command. I was being slightly pedagogical in making a decision about the power I needed as part of the calculation process.

Ron�n Conroy
[email protected]




*
* 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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index