calculate the pvalue : called from loop_calc_pvalue()
calc_pvalue(n0a, n1a, n2a, n0, n1, n2, pa, pb, x, mua, mub, sumsqx, siga, sigb,
vary, beta, skipiter, pvalue)outer loop index
middle loop index
inner loop index
the major allele homozygotes
the major allele heterozygotes
the minor allele zygotes
parameter of the mixture distribution, a real number between zero and one with pa+pb=1
parameter of the mixture distribution, a real number between zero and one with pa+pb=1
a zero mean explanatory variable from the SNP data set
parameter of the mixture distribution, can be any real number
parameter of the mixture distribution, can be any real number
sum of the squares of x
parameter of the mixture distribution, can be any real number
parameter of the mixture distribution, can be any real number
vary <- pa*(mua^2+siga^2)+pb*(mub^2+sigb^2)-(pa*mua+pb*mub)^2
the beta from the regression being tested
flag to determine if we can skip some calculations
the input pvalue prior to calculating new improved pvalue
pvalue