calc_pvalue: calc_pvalue()

Description Usage Arguments Value

View source: R/gwrpv.R

Description

calculate the pvalue : called from loop_calc_pvalue()

Usage

1
2
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


mfjoneill/gwrpvr documentation built on Dec. 30, 2021, 10:11 p.m.