Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: stpower cox with a binary covariate

From   Steven Samuels <>
Subject   Re: st: stpower cox with a binary covariate
Date   Thu, 17 Feb 2011 15:16:31 -0500

Anders, you calculated the SD incorrectly:

It should be: (.1*(1-.1))^.5 = .09^.5 = 0.30


On Feb 17, 2011, at 2:15 PM, Anders Gaarsdal Holst wrote:

Dear Statalist,

I'm trying to do a sample size calculation for a study we are
planning. In the study we are going to examine the cardiac rhythm
disorder atrial fibrillation (binary covariate) as a predictor for
stroke (endpoint) and analyze the data in a Cox ph model. We are
probably going to analyze it with atrial fibrillation as a time
dependent covariate but for power calculation purposes I regard the
covariate as non time dependent.

The probability of having a stroke in the follow up period is assumed
to be 4%, the prevalence of atrial fibrillation is assumed to be 10%
and the desired detectable difference is set to a HR of 3.

When I try to do as described in the Stata 11 manual, I calculate the
SD of my covariate as:

. di 0.1*(1 -0.1)^0.5

This gives me following:
. stpower cox, failprob(0.04) hratio(3.00) sd(0.095) hr

Estimated sample size for Cox PH regression
Wald test, hazard metric
Ho: [b1, b2, ..., bp] = [0, b2, ..., bp]

Input parameters:

        alpha =    0.0500  (two sided)
       hratio =    3.0000
           sd =    0.0950
        power =    0.8000
    Pr(event) =    0.0400

Estimated number of events and sample size:

            E =       721
            N =     18015

This sample size seems very high, and I think I am doing something
wrong, but what?

Sincere regards,
Anders Gaarsdal Holst
MD, Research Fellow
Department of Cardiology, B2142
University Hospital Rigshospitalet
Blegdamsvej 9
2100 Copenhagen

Phone: +45 35450639
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index