Skip to content

Further problems with ChaoShared #2

@PhilippeJeanneret

Description

@PhilippeJeanneret

Dear Anne,
Further testing of 'ChaoShared' showed errors difficult to understand:
test <- data.frame(v1 = c(1,1,0,0), v2 = c(1,0,1,1))
ChaoShared(test, datatype="abundance", se=TRUE, nboot=200, conf=0.95)
gives outputs but this:
data.frame(v1 = c(1,1,0,1), v2 = c(1,0,1,0))
results in "Error in rmultinom(B, n2, p2) : NA in probability vector
Called from: rmultinom(B, n2, p2)
"
Quite strange, isn't it? In both cases, both communities have 1 species shared (the first one), one community has 1 exclusive species and the other community has 2 exclusive species.
But more remarkably, by reversing v1 and v2, 'ChaoShared' gives an output:
test <- data.frame(v1 = c(1,0,1,1), v2 = c(1,1,0,0))

I hope you can help me to understand, respectively resolve the problem.
Thanks in advance for your answer.
Best regards,
Philippe

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