ttpower: Power calculation in trend-in-trend design

Description Usage Arguments Value References Examples

View source: R/TrendInTrend.R

Description

Monte Carlo power calculation for trend-in-trend design.

Usage

1
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

1
2
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)

TrendInTrend documentation built on March 13, 2020, 2:54 a.m.