Skip to content

cryptic error in prop.test explainer with 3 or more proportions #3

@davharris

Description

@davharris

I tried adding a check for it in the code, but I don't think I understand the big picture well enough to capture the error effectively.

> prop.test(c(11, 10, 4), c(12, 12, 12)) %>% explain()
Quitting from lines 124-128 () 
## Error in if (x$p.value < 1 - attr(x$conf.int, "conf")) {: argument is of length zero
## Warning: NAs introduced by coercion
## Error in if (x$p.value < 1 - attr(x$conf.int, "conf")) "reject" else "do not reject": argument is of length zero
Warning message:
In prop.test(c(11, 10, 4), c(12, 12, 12)) :
  Chi-squared approximation may be incorrect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions