Skip to content

Error when using debug_level in ds #136

@lenthomas

Description

@lenthomas

The following code produces a "failure to converge" warning:

library(Distance)
data("PTExercise")
conversion.factor <- convert_units("meter", NULL, "hectare")
bin.cutpoints.20m <- seq(0, 20, by = 2.5)
PTExercise.uf.cos.t20m <- ds(data=PTExercise, transect="point", key="unif", adjustment="cos",
                             convert_units=conversion.factor, cutpoints=bin.cutpoints.20m)

Screenshot 2022-10-10 001525

To try to investigate the problem (I wanted to see what start values were used in the cosine(1,2) model), I tried setting debug_level to 1.

PTExercise.uf.cos.t20m <- ds(data=PTExercise, transect="point", key="unif", adjustment="cos",
                             convert_units=conversion.factor, cutpoints=bin.cutpoints.20m,
                             debug_level = 1)

But this led to some errors that I did not encounter without setting debug_level, starting with an error in round error:

Screenshot 2022-10-10 001802

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