Description Usage Arguments Details Value Note Author(s) References
This is the function that calculates profileLikelihood for a single SNP. The main function evian
calls this function repeatedly to obtain results for multiple SNPs.
1 2  calculateGLR(snp, formula_tofit, model, data, bim, lolim, hilim, m, bse,
family, c, plinkCC)

snp 
a string specifying the SNP of interests to be calculated. 
formula_tofit 
a formula object of the genetic model. The model should be formatted as 
model 
a string specifying the mode of inheritance parameterization: 
data 
data frame; read from the argument 
bim 
data frame; read from from the argument 
lolim 
numeric; the lower limit for the grid or the minimum value of the regression parameter β used to calculate the likelihood function. 
hilim 
numeric; the upper limit for the grid or the maximum value of the regression parameter β used to calculate the likelihood funciton. 
m 
numeric; the density of the grid at which to compute the standardized likelihood function. A beta grid is defined as the grid of values for the SNP parameter used to evaluate the likelihood function. 
bse 
numeric; the number of beta standard errors to utilize in constraining the beta grid limits. Beta grid is evaluated at β +/ 
family 
the link function for 
c 
numeric; interval of Null Hypothesis to be tested. 
plinkCC 
A boolean type that specifies how case/control are coded. case/control were coded 1/0 if it is FALSE, and were coded 2/1 if TRUE. 
calculateGLR
conducts a likelihood ratio test for testing the SNP of interest. It uses the same numerical approach as the main function calculateEvianMLE to construct the likelihood function and it is then testing whether the effect of the SNP falls in an interval (c, c) instead of testing whether the effect is 0 as in the calculateEvianMLE.
This function outputs a dataframe that contains the summary statistics of the profile likelihood calculation. It contains the following columns:
GLR
: the estimated generalized Likelihood ratio, a value smaller than 1 indicating in favor of the null hypothesis whereas a value greater than 1 indicating in favor of the alternative hypothesis.
boundary
: the boundary where null hypothesis is defined. i.e. the value c in (c, c)
AF
: allele frequency for the effective allele
SNP
: SNP ID
bp
: base pair position from the bim
input
effect
, ref
: the effective allele and the other allele from the bim
input
When lolim
or hilim
are NOT defined, then the boundaries of the beta grid will be determined by the default bse=5
, or a bse
defined by the user. Otherwise, the user can define the exact beta grid boundaries using lolim
and hilim
.
In some cases the beta grid (using bse
or lolim
,hilim
) may need to be increased substantially (bse
as large as 15) if covariates are present in the formula. This is automatically dealt by the current function, but contributes to longer computation time to find the appropriate ranges. Estimation may become inaccurate with large number of correlated covariates, which is a known limitation of profile likelihoods.
Dr. Lisa J Strug lisa.strug@utoronto.ca
Bickel, D. R. (2012). “The strength of statistical evidence for composite hypotheses: Inference to the best explanation.” Statistica Sinica, 22, 11471198.
Zhang, Z., \& Zhang, B. (2013). “A likelihood paradigm forclinical trials. Journal of Statistical Theory and Practice”, 7, 157177.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.