transf.inter {SNPmaxsel}R Documentation

Transforms a pair of SNPs into a single variable with nine categories

Description

The function transf.inter creates a new variable with 9 categories out of a pair of variables with 3 categories (e.g. SNPs). The new variable is generated as described in Boulesteix et al (2007): =1 if x1=1 and x2=1, =2 if x1=2 and x2=1, =3 if x1=3 and x2=1, =4 if x1=1 and x2=2, =5 if x1=2 and x2=2, =6 if x1=3 and x2=2, =7 if x1=1 and x2=3, =8 if x1=2 and x2=3, =9 if x1=3 and x2=3.

Usage

transf.inter(x1,x2)

Arguments

x1 a numeric vector of length n giving the first SNP, coded as 1,2,3.
x2 a numeric vector of length n giving the second SNP, coded as 1,2,3.

Value

a numeric vector of length n containing the new variable with 9 categories.

Author(s)

Anne-Laure Boulesteix (http://www.slcmsr.net/boulesteix)

References

Boulesteix AL, Strobl C, Weidinger S, Wichmann HE, Wagenpfeil S, 2007. Multiple testing for SNP-SNP interactions. Submitted.

See Also

maxsel,maxsel.asymp.test.

Examples

# load SNPmaxsel library
# library(SNPmaxsel)

x1<-sample(3,100,replace=TRUE)
x2<-sample(3,100,replace=TRUE)

transf.inter(x1,x2)


[Package SNPmaxsel version 1.0-1 Index]