omnibusTest.Rd
OmnibusTest
calculates overall p-value for linear combination of
variables using likelihood ratio test.
omnibusTest(
object,
omnibus_groups,
placeholder = "term",
correction = "bonferroni",
n_correction = NULL
)
An existing fit from a model function such as lm, glm and many others.
List of character vectors giving sets of variables for which omnibus test should be applied.
String specifying term in object
's formula which
should be substituted with variables during analysis.
String specifying multiple testing correction method. See details for further information.
Integer specifying number of comparisons to consider during multiple testing correction calculations. For Bonferroni correction it is possible to specify a number lower than the number of comparisons being made. This is useful in cases when knowledge about the biology or redundance of alleles reduces the need for correction. For other methods it must be at least equal to the number of comparisons being made; only set this (to non-default) when you know what you are doing!
Data frame with columns:
"group" Omnibus group name
"term" Elements of omnibus group added to base model
"df" Difference in degrees of freedom between base and extended model
"logLik" Difference in log likelihoods between base and extended model
"statistic" Chisq statistic
"p.value" P-value
"p.adjusted" Adjusted p-value
Likelihood ratio test is conducted by comparing a model given in an
object
with an extended model, that is created by including the effect
of variables given in variables
as their linear combination.
midas <- prepareMiDAS(hla_calls = MiDAS_tut_HLA,
colData = MiDAS_tut_pheno,
experiment = "hla_aa")
# define base model
object <- lm(disease ~ term, data = midas)
omnibusTest(object,
omnibus_groups = list(
A_29 = c("A_29_D", "A_29_A"),
A_43 = c("A_43_Q", "A_43_R")
))
#> Warning: While evaluating the model problems occured:
#>
#> • Warnings:
#> • Coefficients for variables: A_29_A could not be estimated, those variables will not be included in likelyhood ratio test result.; occured 1 times, including variables: A_29_D
#> • Coefficients for variables: A_43_R could not be estimated, those variables will not be included in likelyhood ratio test result.; occured 1 times, including variables: A_43_Q
#> group term df logLik statistic p.value p.adjusted
#> 1 A_29 A_29_D 1 0.5007512 1.001502 0.31694726 0.63389452
#> 2 A_43 A_43_Q 1 2.1307456 4.261491 0.03898569 0.07797137