[Genabel-commits] r726 - in pkg/GenABEL: . inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 18 12:55:56 CEST 2011


Author: yurii
Date: 2011-05-18 12:55:56 +0200 (Wed, 18 May 2011)
New Revision: 726

Removed:
   pkg/GenABEL/inst/unitTests/runit.polylik.R
Modified:
   pkg/GenABEL/CHANGES.LOG
Log:


Modified: pkg/GenABEL/CHANGES.LOG
===================================================================
--- pkg/GenABEL/CHANGES.LOG	2011-05-18 09:13:02 UTC (rev 725)
+++ pkg/GenABEL/CHANGES.LOG	2011-05-18 10:55:56 UTC (rev 726)
@@ -1,6 +1,6 @@
 *** v. 1.6-7 (2011.05.17)
 
-Submitted 1.6-7, based on r724, to CRAN
+Submitted 1.6-7, based on r725, to CRAN
 
 Deleting some pdf from 'doc' and compressing 'data'
 

Deleted: pkg/GenABEL/inst/unitTests/runit.polylik.R
===================================================================
--- pkg/GenABEL/inst/unitTests/runit.polylik.R	2011-05-18 09:13:02 UTC (rev 725)
+++ pkg/GenABEL/inst/unitTests/runit.polylik.R	2011-05-18 10:55:56 UTC (rev 726)
@@ -1,50 +0,0 @@
-### --- Test setup ---
-#
-# regression tests
-#
-
-if(FALSE) {
-    ## Not really needed, but can be handy when writing tests
-    library(RUnit)
-    library(GenABEL)
-}
-
-### do not run
-#stop("SKIP THIS TEST")
-###
-
-### ---- common functions and data -----
-
-#source(paste("../inst/unitTests/shared_functions.R"))
-#source(paste(path,"/shared_functions.R",sep=""))
-
-### --- Test functions ---
-
-test.polylik <- function()
-{
-    data(ge03d2.clean)
-    df <- ge03d2.clean[1:150,autosomal(ge03d2.clean)]
-    gkin <- ibs(df,w="freq")
-    set.seed(1)
-    phdata(df)$height <- phdata(df)$height+rnorm(nids(df),sd=.1*sd(phdata(df)$height,na.rm=TRUE))
-    formula <- height ~ sex + age
-    mf <- model.frame(formula,phdata(df),na.action=na.omit,drop.unused.levels=TRUE)
-    y <- model.response(mf)
-    desmat <- model.matrix(formula,mf)
-    phids <- rownames(phdata(df))[rownames(phdata(df)) %in% rownames(mf)]
-    relmat <- gkin; relmat[upper.tri(relmat)] <- t(relmat)[upper.tri(relmat)]; 
-    relmat <- 2.*relmat; relmat <- relmat[phids,phids]
-    eigenRO <- eigen(ginv(relmat),symm=TRUE)
-    eigenRes <- eigen(relmat,symm=TRUE)
-    tO <- system.time(h2htOld <- polygenic(formula,kin=gkin,df,llfun="polylik"))
-    tN <- system.time(h2htNew <- polygenic(formula,kin=gkin,df,llfun="polylik_eigen"))
-    tO; tN; tO/tN;
-    print(h2htNew$h2an)
-    print(h2htOld$h2an)
-    checkEquals(h2htNew$h2an$est,h2htOld$h2an$est)
-    checkEquals(h2htNew$h2an$min,h2htOld$h2an$min)
-    checkEquals(h2htNew$residualY,h2htOld$residualY)
-    checkEquals(h2htNew$pgresidualY,h2htOld$pgresidualY)
-    checkEquals(h2htNew$InvSigma,h2htOld$InvSigma)
-    checkEquals(h2htNew$measuredIDs,h2htOld$measuredIDs)
-}
\ No newline at end of file



More information about the Genabel-commits mailing list