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