| gwrpv {gwrpvr} | R Documentation | 
Genome-Wide Regression P-Value (gwrpv) in R
Description
Computes the sample probability value (p-value) for the estimated coefficient from a standard genome-wide univariate regression. It computes the exact finite-sample p-value under the assumption that the measured phenotype (the dependent variable in the regression) has a known Bernoulli-normal mixture distribution.
Usage
gwrpv(beta, n0, n1, n2, mua, siga, mub, sigb, pa, pb, logdelta = -16,
  lognearnorm = -5, logtopsum = 8)
Arguments
| beta | the beta being tested | 
| n0 | number of major allele homozygotes | 
| n1 | number of major allele heterozygotes | 
| n2 | number of minor allele zygotes | 
| mua | parameter of the mixture distribution, can be any real number | 
| siga | parameter of the mixture distribution, can be any real number | 
| mub | parameter of the mixture distribution, can be any real number | 
| sigb | parameter of the mixture distribution, can be any real number | 
| 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 | 
| logdelta | must be in log base 10 format, with default value set to -16 | 
| lognearnorm | must be in log base 10 format, with default value set to -5 | 
| logtopsum | must be in log base 10 format, with default value set to 8 | 
Value
gwrpv returns a list containing:
- $pvalue
- p-value of a two-sided hypothesis test for a true coefficient of zero 
- $skew
- skewness 
- $kurt
- kurtosis of the coefficient estimate under assumed model 
- $skiptype
- type of trimming/skip which took place (zero means no trimming) 
- $totnobs
- total number of observations 
- $loopruns
- number of sums in the main computation for each regression case 
.
Examples
beta <- 6.05879
n0 <- 499
n1 <- 1
n2 <- 0
mua <- 13.87226
siga <- 2.58807
mub <- 4.62829
sigb <- 2.51803
pa <- 0.96544
pb <- 0.03456    # alternatively: pb <- 1.0 - pa
gwrpv(beta,n0,n1,n2,mua,siga,mub,sigb,pa,pb)
# note default values have been used for the trim parameters above
# in the following example we explicitly set the trim parameters
#
g <- gwrpv(beta,n0,n1,n2,mua,siga,mub,sigb,pa,pb,logdelta=-16,lognearnorm=-5,logtopsum=8)
g$pvalue