transf.inter: Transforms a pair of SNPs into a single variable with nine...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/transf.inter.r

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

1
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.ibe.med.uni-muenchen.de/organisation/mitarbeiter/020_professuren/boulesteix/index.html)

References

Boulesteix AL, Strobl C, Weidinger S, Wichmann HE, Wagenpfeil S, 2007. Multiple testing for SNP-SNP interactions. Statistical Applications in Genetics and Molecular Biology 6:37.

See Also

maxsel,maxsel.asymp.test.

Examples

1
2
3
4
5
6
7
# load SNPmaxsel library
# library(SNPmaxsel)

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

transf.inter(x1,x2)

SNPmaxsel documentation built on May 2, 2019, 8:33 a.m.