Sample size calculation in Stata

7 views
Skip to first unread message

Sandra Alba

unread,
Jun 24, 2009, 12:48:03 PM6/24/09
to MedS...@googlegroups.com
Hi everyone,

I am trying to do a power analysis in Stata for a prevalence given the precision, but cannot find any information on how to do that. Does anybody have any suggestions?

Many thanks,

Sandra

BXC (Bendix Carstensen)

unread,
Jun 24, 2009, 5:38:12 PM6/24/09
to MedS...@googlegroups.com
Simulate some data, analyse them to see what the precison is.
Then trial an error will allow you to pick the appropriate sample size.

Analytically, the normal approximation to the log-odds gives a confidence interval for
the prvalence based on x out of n:

p = x/n

ci.: lower: p/[p+(1-p)*exp{1.96/sqrt(n*p(1-p))}]
upper: p/[p+(1-p)/exp{1.96/sqrt(n*p(1-p))}]

which allows you to do the trial and error analytically.

Best regards,
Bendix Carstensen
_______________________________________________

Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2-4
DK-2820 Gentofte
Denmark
+45 44 43 87 38 (direct)
+45 30 75 87 38 (mobile)
b...@steno.dk http://www.biostat.ku.dk/~bxc
www.steno.dk

Reply all
Reply to author
Forward
0 new messages