Learn R Programming

gap (version 0.4)

htr: Haplotype trend regression

Description

Haplotype trend regression (with permutation)

Usage

htr(y,x,n.sim=0)

Arguments

y
a vector of phenotype
x
a haplotype table
n.sim
the number of permutations

Value

  • The returned value is a list containing:
  • fthe F statistic for overall association
  • pthe p value for overall association
  • fvthe F statistics for individual haplotypes
  • pithe p values for individual haplotypes

References

Zaykin DV, Westfall PH, Young SS, Karnoub MA, Wagner MJ, Ehm MG (2002) Testing association of statistically inferred haplotypes with discrete and continuous traits in samples of unrelated individuals. Hum. Hered. 53:79-91

See Also

htr

Examples

Run this code
# 26-10-03
test2<-read.table("test2.dat")
y<-test2[,1]
x<-test2[,-1]
y<-as.matrix(y)
x<-as.matrix(x)
htr.test2<-htr(y,x)
htr.test2
htr.test2<-htr(y,x,n.sim=10)
htr.test2

# 13-11-2003
data(apoeapoc)
apoeapoc.gc<-gc.em(apoeapoc[,5:8])
y<-apoeapoc$y
for(i in 1:length(y)) if(y[i]==2) y[i]<-1
htr(y,apoeapoc.gc$htrtable)

Run the code above in your browser using DataLab