Computes joint and stratified effects of the SNP and another variable based on a fitted model.
Return object from
Name of the second variable to compute the effects for. This variable can be
a dummy variable, continuous variable, or a factor. Note that if this variable enters the model
as both a main effect and interaction, then it must enter the model the same way as a main effect
and interaction for the effects to be computed correctly.
For example, if
Vector of values from "UML", "CML", "EB" or "CCL", "HCL", "CLR". The default is NULL.
The joint and stratified effects are computed for each method in
The stratified effects are the sub-group effect of the SNP stratified by
var and the sub-group effect of
var stratified by the SNP.
Definition of joint and stratified effects:
Consider the model:
logit(P(y=1)) = alpha + beta*SNP + gamma*X + delta*SNP*X.
Let 0 be the baseline for SNP and x_0 the baseline for X. Then the joint effect for SNP = s and X = x relative to SNP = 0 and X = x_0 is
exp(alpha + beta*s + gamma*x + delta*s*x)/exp(alpha + gamma*x_0)
The stratified effect of the SNP relative to SNP = 0 given X = x is
exp(alpha + beta*s + gamma*x + delta*s*x)/exp(alpha + gamma*x)
The stratified effect of
var relative to X = x given SNP = s is
exp(alpha + beta*s + gamma*x + delta*s*x)/exp(alpha + beta*s)
A convenient way to print the returned object to view the effects tables is with the function
fit is of class
snp.logistic, then the return object is a list of with names "UML", "CML", and "EB".
fit is of class
snp.matched, then the return object is a list of with names "CLR", "CCL", and "HCL".
Each sublist contains joint effects, stratified effects, standard errors and confidence intervals.
The sub-group effect of the SNP stratified by
var is in the list "StratEffects", and the
sub-group effect of
var stratified by the SNP is in the list "StratEffects.2".
1 2 3 4 5 6 7 8 9 10 11
# Use the ovarian cancer data data(Xdata, package="CGEN") # Fit using a stratification variable fit <- snp.logistic(Xdata, "case.control", "BRCA.status", main.vars=c("oral.years", "n.children"), int.vars=c("oral.years", "n.children"), strata.var="ethnic.group") # Compute the effects effects <- snp.effects(fit, "oral.years", var.levels=0:5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.