# v0.2.9 created on March 16, 2021
# (1) make description of 'n' consistent across package: Total number of subjects
#
# v0.2.8 created on March 11, 2021
# (1) added info about default parameters for powerEQTL.ANOVA
#
# v0.2.7 created on Feb. 24, 2021
# (1) rebuilt after Rshiny app testing
#
# v0.2.6 created on Feb. 14, 2021
# (1) rename 'nSubj' back to 'n' and 'nCellPerSubj' back to 'm' to be consistent with other R functions in this package
# (2) use asymptotic distribution of test statistics to calculate power to get stable results and to improve speed.
# (3) added Xiaoqi Li as author of the R package 'powerEQTL'
# (4) rename 'int' to 'm.int'
# (5) give more details about 'nTests'
#
# v0.2.5 created on Feb. 14, 2021
# (1) use cutoff based-on null hypothesis to calculate power
# since p-value returned by GLMMadaptive or glmmTMB is asymptotic p-value which requires large sample size
# (2) add functions to estimate slope, n, MAF for simulation-based power calculation
#
# v0.2.4 created on Feb. 10, 2021
# (1) NBZIMM not in CRAN yet. temporarily remove NBZIMM
#
# v0.2.3 created on Feb. 8, 2021
# (1) add function 'simDat.eQTL.scRNAseq' (simulate gene expression for a gene and genotype for a SNP for a scRNAseq analysis)
# (2) add function 'powerEQTL.scRNAseq.sim' (calculate power for eQTL via scRNAseq data by using simulation approach)
#
# v0.2.2 created on Nov. 1, 2020
# (1) rebuild .tar.gz
# v0.2.1 created on July 25, 2020
# (1) update author list for manuscript
# (2) use sigma, instead of sigma.epsilon, to represent standard deviation of random error
#
# v0.2.0 created on June 27, 2020
# (1) for SLR method, use beta_0 and beta_1 to replace gamma and lambda
# (2) use lambda to denote non-centrality parameter
# (3) set upper bound of MAF as 0.5 - 1e-6
# (4) when calculating MAF in powerEQTL.SLR, we need to satisfy
# MAF < 0.5 - sqrt(a) if a > 0
# where a = 1/4 - sigma.y^2/(2*delta^2)
# (5) also require -b < slope < b, where b = sigma.y/sqrt(2*MAF*(1-MAF))
# when calculate power based on SLR
# v0.1.9 created on June 22, 2020
# (1) created functions 'ssEQTL.scRNAseq', 'minSlopeEQTL.scRNAseq',
# 'minMAFeQTL.scRNAseq'
# (2) rename 'alpha' in powerEQTL.scRNAseq' by 'FWER'
# (3) rename 'theta' in powerEQTL.scRNAseq' by 'MAF'
#
# v0.1.8 created on June 21, 2020
# (1) use exact power calculation formula in 'powerEQTL.SLR'
# (2) remove the dependency with powerMediation
# (3) remove functions related to 'powerEQTL.ANOVA2'
# (4) write wrapper functions so that we can calculate
# power, sample size, effect size, or MAF using one function
# (5) for powerEQTL.SLR related functions, use 'sigma.y' as input
# instead of 'sigma'
# (6) polish R code
#
# v0.1.7 created on Apr. 29, 2020
# (1) changed weiliang's email at Author@R to 'weiliang.qiu@gmail.com'
#
# v0.1.6 created on Apr. 28, 2020
# (1) fixed a bug in functions 'ssEQTL.ANOVA' and 'ssEQTL.ANOVA2':
# squared difference first drops then increase so tiny a bit to locate
# minimum value. So use difference instead of squared difference.
#
# v0.1.5 created on Apr. 22, 2020
# (1) add function powerLMEnoCov
#
# v0.1.4 created on Apr. 7, 2020
# (1) added functions powerScRNAseq and powerLME
# (2) changed maintainer's email from stwxq@channing.harvard.edu to weiliang.qiu@gmail.com
#
# v0.1.3 created on Jan. 24, 2017
# add GitHub URL (https://github.com/sterding/powerEQTL)
# to DESCRIPTION file
# v0.1.2 created on Jan. 23, 2017
# (1) revise "Description" section in DESCRIPTION file
# (2) In example of "minMAFeQTL.ANOVA.Rd": "replace myntotal = 200" by "myntotal = 234"
# v0.1.1 created on Jan. 19, 2017
# (1) fixed a typo in minMAFeQTL.sLR.Rd: value should be minimum detectable MAF
#
# v0.1.0 created on Jan. 15, 2017
# (1) move "powerMediation" from Depends to Imports
# (2) add functions 'minMAFeQTL.ANOVA' and 'minMAFeQTL.SLR'
# v0.0.9 created on Jan. 13, 2017
# (1) revised 'minEffectEQTL.ANOVA'
#
# v0.0.8 created on Dec. 31, 2016
# (1) edited online helps
#
# v0.0.7 created on Dec. 30, 2016
# (1) added author "Scott T. Weiss"
# (2) edited online helps
#
# v0.0.6 created on Dec. 27, 2016
# (1) add intermediate output to 'minEffectEQTL.ANOVA'
# (2) edited online menu for 'minEffectEQTL.ANOVA'
#
# v0.0.5 created on Dec. 26, 2016
# (1) change depends to R (>= 3.3.0)
# (2) change the author order
#
# v0.0.4 created on Dec. 12, 2016
# (1) added functions 'powerEQTL.ANOVA2' and 'ssEQTL.ANOVA2'
# v0.0.3 created on Dec. 12, 2016
# (1) fixed a bug in powerEQTL.ANOVA.R:
# gm1 = deltaVec[1]
# should be
# gm1 = -deltaVec[1]
#
# (2) fixed a bug in minEffectEQTL.ANOVA: need to directly use simplified power calculation formula. So add function 'powerEQTL.ANOVA'
#
# v0.0.2 created on Dec. 11, 2016
# (1) relax the assumption in ANOVA approach: mu2-mu1 can be different from mu3-mu2
# (2) add function minEffectEQTL.ANOVA to calculate minimum detectable effect size
# delta/sigma. This would be helpful in design stage where we have no prior
# info about delta and sigma. delta=mu2-mu1=mu3-mu2.