Skip to content

Issue with cohen's kappa calculation in Part 3 #87

@timothyLeeXQ

Description

@timothyLeeXQ

Hi Dr Lang,
I was working on Part 3 of Assignment 7 and got a kappa metric that is more than 1 using the code that was already in the assignment:
kappa(matrix2, exact = TRUE)/kappa(matrix2)

This should be impossible, so I calculated kappa manually and got numbers that made sense. I also tried psych::cohen.kappa() and got numbers that agreed with my calculations.

The documentation for base::kappa() suggests that the function is supposed to conduct QR decomposition of a matrix rather than cohen's kappa. As far as I can tell, these two concepts aren't related, and dividing kappa(x, exact = TRUE) by kappa(x) just gives a metric of how 'off' the estimate (computed when exact = FALSE) was from the actual decomposition (computed when exact = TRUE), rather than cohen's kappa.

Am I right about this? If so, I think it could be worth flagging to the class. I've submitted a pull request so you can replicate the issue - the relevant portions are within lines 151 and 260 of the .Rmd file.

Thanks,
Timothy

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