README.md

CircaPower

Update on 3/14/2025 The non-central parameter (ncp) formula is corrected as indicated in Dr. Pål O. Westermark's commentary "Minding averages: Comment on “Experimental design and power calculation in omics circadian rhythmicity detection using the cosinor model” by Zong et al.".

Install This Package from github

library(devtools)
install_github("https://github.com/circaPower/CircaPower") 

Citation

Full tutorial

http://htmlpreview.github.io/?https://github.com/circaPower/CircaPower/blob/main/vignettes/CircaPower.html

Short tutorial

library(CircaPower)

## Calculate power given (1) sample size n, (2) intrinsic effect size r, and (3) alpha level
CircaPower(n=12, r=1.5, alpha = 0.05)

## Calculate sample size given (1) pre-specified power, (2) intrinsic effect size r, and (3) alpha level
CircaPower(power=0.8, r=1.5, alpha = 0.05)

library(CircaPower)

## Use observed time of death from the human post-mortem brain transcriptomic study on Brodmann's area 11 and 47 in the prefrontal cortex as an example.
data(cts_Chen)

## Calculate power given (1) sample size n, (2) intrinsic effect size r, (3) irregular circadian times and (3) alpha level
CircaPower(n=100, r=0.4, cts=cts_Chen, alpha = 0.05)

## Calculate sample size given (1) pre-specified power, (2) intrinsic effect size r, (3) irregular circadian times and (3) alpha level
CircaPower(power=0.75, r=0.4, cts=cts_Chen, alpha = 0.05)



circaPower/CircaPower documentation built on April 17, 2025, 3:28 a.m.