Skip to content

Possible mismatch between implementation and documentation #27

@WillemsIlias

Description

@WillemsIlias

Problem
In the documentation of comp(), it is stated that the test statistic used for the test for trend is defined as the sum of terms W(t) * [e_{ji} - n_{ji} e_i / n_i]. Yet, it seems to return the sum of terms the sum of terms W(t) * [n_{ji} e_i / n_i - e_{ji}].

Possible cause
Looking at the implementation of comp.ten, it seems that the part [e_{ji} - n_{ji} e_i / n_i] correspond to the variable eMP1, which is computed by predict.ten. In the implementation of predict.ten, the line res1[, (na1) := data.frame(as.matrix(res1) - e1)] then seems to imply that actually [n_{ji} e_i / n_i - e_{ji}] is computed.

Question
Am I misinterpretting the output and implementation, or is this a bug in the code?

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