Skip to content

Cook's distance, DFFITS, and DFBETAS always label at least one point #1

@mtnbikerjoshua

Description

@mtnbikerjoshua

The functions jcreg_cooksd, jcreg_dffits and jcreg_dfbetas all have an argument nLabels which works fine unless nLabels = 0. If nLabels is set to zero, the functions still label one point. The problem has something to do with this line of code:

top_dff <- as.numeric(names(sort(abs(df_fits), decreasing = TRUE)[1:nLabels]))

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