Description Usage Arguments Value References Examples
View source: R/fdr-sampsize-v1.0e.R
Use the formula of Hseih and Lavori (2000) to compute the power of a single-predictor Cox model.
1 | power.cox (n, alpha, logHR, v)
|
n |
number of events (scalar) |
alpha |
p-value threshold (scalar) |
logHR |
log hazard ratio (vector) |
v |
variance of predictor variable (vector) |
vector of power estimates for two-sided test
Hsieh, FY and Lavori, Philip W (2000) Sample-size calculations for the Cox proportional hazards regression model with nonbinary covariates. Controlled Clinical Trials 21(6):552-560.
1 2 3 4 5 6 7 8 |
function (n, alpha, logHR, v)
{
pnorm(qnorm(alpha/2), sqrt(n * v) * logHR) + 1 - pnorm(qnorm(1 -
alpha/2), sqrt(n * v) * logHR)
}
<environment: namespace:FDRsampsize>
n alpha ave.pow fdr.hat act.fdr
25.00000000 0.00868988 0.80002664 0.08907730 0.08905233
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.