Skip to content

BUG? default shift_zeros in contingency tables #3579

Closed

Description

@josef-pkt

see #3576 (comment)

it looks like it is adding 0.5 everywhere

table = np.asarray([[ 1.,  0.,  10.],
                   [ 2.,  1.,  1.],
                   [ 1.,  0.,  0.]])    

>>> sm.stats.Table(table, shift_zeros=False).table
array([[  1.,   0.,  10.],
       [  2.,   1.,   1.],
       [  1.,   0.,   0.]])

>>> sm.stats.Table(table, shift_zeros=True).table
array([[  1.5,   0.5,  10.5],
       [  2.5,   1.5,   1.5],
       [  1.5,   0.5,   0.5]])

Also AFAIK, that wouldn't be recommended because it makes the nominal_association test too conservative.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions