From noreply at r-forge.r-project.org Tue Apr 15 22:07:51 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 15 Apr 2014 22:07:51 +0200 (CEST) Subject: [Analogue-commits] r413 - in pkg: . R inst Message-ID: <20140415200751.EAD4018775B@r-forge.r-project.org> Author: gsimpson Date: 2014-04-15 22:07:50 +0200 (Tue, 15 Apr 2014) New Revision: 413 Modified: pkg/DESCRIPTION pkg/R/roc.R pkg/inst/ChangeLog Log: fix bug in AUC calculation; bump to 0.13-5 Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2014-02-14 23:07:08 UTC (rev 412) +++ pkg/DESCRIPTION 2014-04-15 20:07:50 UTC (rev 413) @@ -1,7 +1,7 @@ Package: analogue Type: Package Title: Analogue and weighted averaging methods for palaeoecology -Version: 0.13-4 +Version: 0.13-5 Date: $Date$ Depends: R (>= 2.15.0), vegan (>= 1.17-12), lattice, rgl Imports: mgcv, MASS, stats, graphics, grid, brglm, princurve Modified: pkg/R/roc.R =================================================================== --- pkg/R/roc.R 2014-02-14 23:07:08 UTC (rev 412) +++ pkg/R/roc.R 2014-04-15 20:07:50 UTC (rev 413) @@ -37,7 +37,7 @@ optimal <- as.numeric(names(max.roc <- which.max(roc.values))) names(FPE) <- names(TPF) <- names(roc.values) <- NULL wilcox <- wilcox.test(IN, OUT, conf.int = FALSE) - AUC <- 1 - (wilcox$statistic / (n.OUT * n.OUT)) + AUC <- 1 - (wilcox$statistic / (n.IN * n.OUT)) AUC2 <- AUC^2 q1 <- AUC / (2-AUC) q2 <- (2 * AUC2) / (1 + AUC) Modified: pkg/inst/ChangeLog =================================================================== --- pkg/inst/ChangeLog 2014-02-14 23:07:08 UTC (rev 412) +++ pkg/inst/ChangeLog 2014-04-15 20:07:50 UTC (rev 413) @@ -1,5 +1,9 @@ analogue Change Log +Version 0.13-5 + + * roc: fix a bug in the computation of AUC from the U statistic. + Version 0.13-4 13 Feb 2014 * crossval.pcr: Fixed a number of bugs in the method for PCR