[R] help on haplo.score

Warnes, Gregory R gregory_r_warnes at groton.pfizer.com
Sat Mar 8 01:01:31 CET 2003


The haplo.score function has the parameter "miss.val", which is used to
indicate what numeric values are used to indicate missingness.  By default,
miss.val=0.  [I suspect this is a relic of a standalone form of the
haplo.score program.] Under this coding, no row is completely observed, and
they all get deleted, resulting in an empty data set.  No variation indeed.

To resolve your problem, specify miss.val=NA.  IE,

> hscore<-haplo.score(y,geno,trait.type="binomial",miss=NA)

-Greg

> -----Original Message-----
> From: X. Yu [mailto:xsyu at u.washington.edu]
> Sent: Friday, March 07, 2003 2:27 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] help on haplo.score
> 
> 
> Hi all,
> 
> Recently i am running a new package call "haplo.score" in R 
> which compute
> score statistics to evaluate the association of a trait with
> haplotypes, when linkage phase is unknown.  unfortunately,
> I kept getting an error message like "No variation in y 
> values". where y
> is my trait vector with 1 for disease and 0 for non-disease. 
> if someone
> happen to know why i am getting this error,  please let me 
> know. your help
> is highly appreciated.
> 
> see the following for a part of my data and code.
> i have 5 loci and total 150 subjects, but here i only 
> includes 8 of them
> 
> xuesong
> 
> ## matrix for haplotype data (8x10)
> geno<-matrix(c(0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0 
> ,1, 0, 1, 0, 1,
> 0, 0 ,0, 1, 0, 0, 0, 1, 0, 0,1, 1 ,0, 0, 1, 1, 0, 0, 1,
> 1,),byrow=TRUE,ncol=10)
> geno2<-matrix(c(0, 1, 0, 1, 0, 1, 0, 1, 0, 1,0, 1, 0, 1, 0, 
> 1, 0, 1, 0,
> 1,1, 1, 0, 0, 1, 1, 0, 0, 0, 1,1, 1, 0, 0, 1, 1, 0, 0, 1,
> 1),byrow=TRUE,ncol=10)
> geno<-rbind(geno,geno2)
> 
> ## trait data (binary)
> y<-c(rep(0,4),rep(1,4))
> 
> ## compute score statistic
> library(haplo.score)
> hscore<-haplo.score(y,geno,trait.type="binomial")
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is... [[dropped]]



More information about the R-help mailing list