|
|
|
||||
|
|
|||||
stpower is a suite of Stata commands for sample-size, power, and effect-size determination for survival analysis. Its basic syntax looks like this:
Components that will complicate the matter of power analysis for
survival models include censoring and patterns of accrual time and follow-up time
Below are examples for some really simple-minded power analysis assuming no
censoring.
stpower cox, hratio(3) sd(.75) power(.95) alpha(.001)stpower logrank .2, hratio(.6667) power(.9)stpower exponential .45 .67, t(2)quietly stpower logrank 0.5, hratio(.01(.01) .99) n(100 300) saving(powplot, replace) use powplot, clear twoway (line power hr if n==100) (line power hr if n==300), /// legend(label( 1 "n=100") label( 2 "n=300")) xtitle(Hazard Rate Ratio)
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services