I downloaded DiagnosisMed and have been playing with the ROC function. My version info is:<br><br><div style="margin-left: 40px;">> R.Version()<br>$platform<br>[1] "x86_64-unknown-linux-gnu"<br><br>$arch<br>[1] "x86_64"<br>
<br>$os<br>[1] "linux-gnu"<br><br>$system<br>[1] "x86_64, linux-gnu"<br><br>$status<br>[1] ""<br><br>$major<br>[1] "2"<br><br>$minor<br>[1] "9.0"<br><br>$year<br>[1] "2009"<br>
<br>$month<br>[1] "04"<br><br>$day<br>[1] "17"<br><br>$`svn rev`<br>[1] "48333"<br><br>$language<br>[1] "R"<br><br>$version.string<br>[1] "R version 2.9.0 (2009-04-17)"<br>
</div><br>I had perhaps a dozen segfaults and otherwise warnings everytime I ran it. A typical complaint was:<br><br><div style="margin-left: 40px;"><a href="mailto:diagnosismed-list@lists.r-forge.r-project.org">diagnosismed-list@lists.r-forge.r-project.org</a> *** caught segfault ***<br>
address 0x100000011, cause 'memory not mapped'<br><br>Traceback:<br> 1: makeRestartList(...)<br> 2: withRestarts({ .Internal(.signalCondition(simpleWarning(msg, call), msg, call)) .Internal(.dfltWarn(msg, call))}, muffleWarning = function() NULL)<br>
3: .signalSimpleWarning("longer object length is not a multiple of shorter object length", quote(Y >= Xi))<br> 4: FUN(X[[204L]], ...)<br> 5: lapply(split(X, group), FUN, ...)<br> 6: tapply(X, X, "D10X")<br>
7: ROC(gold = gold, test = test, Print = Print)<br> 8: roc.plot(AC.gold, frm$OldACDiff, label = "AdCreative - Current scale")<br></div><br>I took a look at the code where the problem was occurring:<br><br><div style="margin-left: 40px;">
m <- length(X)<br> n <- length(Y)<br> D10X <- function(Xi) {<br> (1/n) * sum(Y >= Xi)<br> }<br> D01Y <- function(Yi) {<br> (1/m) * sum(Yi >= X)<br> }<br> VAR.AUC <- sum((tapply(X, X, "D10X") - AUC)^2)/(m * (m - <br>
1)) + sum((tapply(Y, Y, "D01Y") - AUC)^2)/(n * (n - 1))<br></div><br>It looks like the code should run, expanding the Yi to rep(Yi, m) and likewise for Xi. When I explicitly replaced those two statements with:<br>
<br> (1/n) * sum(Y >= rep(Xi, n))<br>
<br>and<br><br> (1/m) * sum(rep(Yi, m) >= X)<br>
<br>
everything ran just fine. Thought I'd let you know. Thanks for making the package available!<br><br>Pete<br>