ttpower {TrendInTrend} | R Documentation |
Power calculation in trend-in-trend design
Description
Monte Carlo power calculation for trend-in-trend design.
Usage
ttpower(N, time, G, cstat, alpha_t, beta_0, h1.OR, nrep)
Arguments
N |
Sample Size. |
time |
Number of time points. |
G |
Number of CPE strata. |
cstat |
Value of the c-statistic. |
alpha_t |
A scaler that qunatifies the trend in exposure prevalence. |
beta_0 |
Intercept of the outcome model. |
h1.OR |
A given odds ratio. |
nrep |
Number of Monte Carlo replicates. |
Value
power |
Power of detecting the given Odds Ratio. |
References
Ertefaie A, Small DS, Ji X, Leonard C, Hennessy S (2018). Statistical Power for Trend-in-trend Design. Epidemiology. 29(3), e21–e23.
Examples
set.seed(123)
ttpower(N=10000,time=10,G=10,cstat=0.75,alpha_t= 0.4,beta_0=-4.3,h1.OR=1.5,nrep=50)
[Package TrendInTrend version 1.1.3 Index]