CircaPower | R Documentation |
Analytical circadian power calculation based on a cosiner model.
CircaPower(
n = NULL,
power = NULL,
r = NULL,
phi = 0,
period = 24,
cts = NULL,
ct_estimation = "expected",
alpha = 0.05
)
n |
Sample size. |
power |
Statistical power. |
r |
Intrinsic effect size. r=A/ |
phi |
Phase shift |
period |
Period of the sinusoidal curve. Default is 24. |
cts |
Circadian times of the putative samples. If cts is NULL, evenly-spaced circadian time design will be used. If cts is not NULL, see more options on ct_estimation. |
ct_estimation |
If ct_estimation=='expected' (default), we will calculate the sampling design factor directly using the observed circadian time; if ct_estimation=='sampling', we will (1) perform kernel density estimation from the observed circadian time, (2) draw n circadian times from the kernel density estimation, (3) calculate the sampling design factor using these drawn samples. |
alpha |
Type I error control. Default is 0.05. |
Exactly one of the parameters 'n','power', 'r' and 'alpha' must be passed as NULL, and that parameter is determined from the others. Notice that alpha has non-NULL default so NULL must be explicitly passed if you want to compute it.
A list of arguments (including the computed one) augmented.
Wei Zong, Zhiguang Huo
CircaPower(n=NULL, power=0.8, r=1.5)
n = 48
cts = seq(0,24,length.out = n+1)[-1]
A = 1
sigma = 1
r = A/sigma
CircaPower(n, r=r, phi=0, period = 24, cts=cts, alpha = 0.001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.