Skip to content

NA behavior in prop.test #748

Description

@AmeliaMN

I was having trouble interpreting the error message

Error in stats::prop.test(t(table_from_formula), p = p, conf.level = conf.level,  : 
  'x' must have 2 columns

but this old issue made it clear that it occurs when one or more of your variables has more than two categories. It turns out that my data has more then two categories because it is a factor with two levels... plus NA. Here's a reprex:

prop.test(anysub~sex, data=HELPrct)

What is the recommended way to deal with this in mosaic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions