New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeLongPlacements produces NA/NaNs when cases or controls contains a single observation #27

Closed
xrobin opened this Issue Apr 28, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@xrobin
Owner

xrobin commented Apr 28, 2018

Surfaced with issue #25.

r <- roc(c("A", "B"), c(0, 1))
ci(r)

r <- roc(c("A", "B", "A", "A"), c(0, 1, 0.5, 1.1))
var(r)

The problem happens when one group has only one observation.

@xrobin

This comment has been minimized.

Owner

xrobin commented Apr 28, 2018

For var, producing NA is actually expected in this case. Compare with var(1)

The might actually be with the bootstrap method, which still manages to resample the data and produce a result if one group has more than one observation:

> r <- roc(c("A", "B", "A"), c(0, 1, 1.1))
> var(r)
[1] NA
> var(r, m="b")
[1] 0.1266878

Overall the behavior seems correct here, nothing to worry about.

However, ci should produce NA and not NaN.

xrobin added a commit that referenced this issue Apr 28, 2018

@xrobin

This comment has been minimized.

Owner

xrobin commented Apr 28, 2018

Fixed ci.auc, now produces NA instead.

@xrobin xrobin closed this Apr 28, 2018

xrobin added a commit that referenced this issue May 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment