powered by
Monte Carlo power calculation for trend-in-trend design.
ttpower(N, time, G, cstat, alpha_t, beta_0, h1.OR, nrep)
Sample Size.
Number of time points.
Number of CPE strata.
Value of the c-statistic.
A scaler that qunatifies the trend in exposure prevalence.
Intercept of the outcome model.
A given odds ratio.
Number of Monte Carlo replicates.
Power of detecting the given Odds Ratio.
Ertefaie A, Small DS, Ji X, Leonard C, Hennessy S (2018). Statistical Power for Trend-in-trend Design. Epidemiology. 29(3), e21<U+2013>e23.
# NOT RUN { 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) # }
Run the code above in your browser using DataLab